# Audio

You can find bank/sound names by [clicking here](https://github.com/SDmodding/Files/blob/main/AudioSFX.xml), and speech list by [clicking here](https://github.com/SDmodding/Files/blob/main/AudioNames_Voices.xml).

To find some other banks/events you can check it by [clicking here](https://github.com/SDmodding/Files/blob/main/Global/Act/AudioTag.xml).

### Static Functions:

#### .PlaySound

`Audio.PlaySound(bank: string, name: string)`: boolean

| Argument | Type   | Description       |
| -------- | ------ | ----------------- |
| bank     | string | Name of the bank  |
| name     | string | Name of the sound |

Returns true if sound was successfully played.

#### .StopSound

`Audio.StopSound(name: string)`

| Argument | Type   | Description       |
| -------- | ------ | ----------------- |
| name     | string | Name of the sound |

Stops the playing sound by name.

#### .PlaySpeech

`Audio.PlaySpeech(character: SimCharacter, event: string, name: string)`: boolean

<table><thead><tr><th width="253">Argument</th><th width="172.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>character</td><td>SimCharacter</td><td>SimCharacter object that will speak</td></tr><tr><td>event</td><td>string</td><td>Event of the sound</td></tr><tr><td>event</td><td>string</td><td>Name of the sound</td></tr></tbody></table>

Returns true if speech was sucessfully played.

#### .StopSpeech

`Audio.StopSpeech(character: SimCharacter)`

<table><thead><tr><th width="218">Argument</th><th width="151.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>character</td><td>SimCharacter</td><td>SimCharacter object that will stop speaking</td></tr></tbody></table>

Stops the speaking of the character.
