---
id: "M:cAlgo.API.Internals.INotifications.PlaySound(System.String)"
kind: "method"
type: "T:cAlgo.API.Internals.INotifications"
url: "https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/PlaySound/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# INotifications.PlaySound

Member of [INotifications](https://help.ctrader.com/ctrader-algo/references/Notifications/INotifications/index.md).

## PlaySound(string fileName)

Plays a notification sound.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: No sound is played. No error is reported.
- Cloud: No sound is played. No error is reported.

C#:

```csharp
void PlaySound(string fileName)
```

Python:

```python
api.Notifications.PlaySound(fileName: str) -> None
```

### Parameters

- `fileName` (`string`, Python `str`): The sound file path

### Examples

C#:

```csharp
Notifications.PlaySound(@"C:\SampleDestination\SampleSound.mp3");
```

Python:

```python
api.Notifications.PlaySound(r"C:\SampleDestination\SampleSound.mp3")
```

## PlaySound(SoundType soundType)

Plays the specified SoundType.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: No sound is played. No error is reported.
- Cloud: No sound is played. No error is reported.

C#:

```csharp
void PlaySound(SoundType soundType)
```

Python:

```python
api.Notifications.PlaySound(soundType: SoundType) -> None
```

### Parameters

- `soundType` (`SoundType`, Python `SoundType`): The SoundType to be played.

### Examples

C#:

```csharp
Notifications.PlaySound(SoundType.PositiveNotification);
```

Python:

```python
api.Notifications.PlaySound(SoundType.PositiveNotification)
```

