--- title: "system.util.playSoundClip" description: "Plays a sound clip from a wav file to the system's default audio device." --- # system.util.playSoundClip > Plays a sound clip from a wav file to the system's default audio device. This function is used in **Python Scripting**. ## Description Plays a sound clip from a wav file to the system's default audio device. The wav file can be specified as a filepath, a URL, or directly as a raw byte[]. ## Client Permission Restrictions This scripting function has no [Client Permission](projects\project-properties\project-properties.md#client---permissions) restrictions. ## Syntax - Using a Byte List `system.util.playSoundClip(wavBytes [, volume] [, wait])` ### Parameters |Type|Parameter|Description| |--|--|--| |byte[] |`wavBytes`| A byte list of a wav file.| |double |`volume` | The clip's volume, represented as a floating point number between 0.0 and 1.0 [optional]| |boolean |`wait` | A boolean flag indicating whether or not the call to playSoundClip should wait for the clip to finish before it returns [optional]| ### Returns Nothing ### Scope Client ## Syntax - Using a Filepath or URL `system.util.playSoundClip(wavFile [, volume] [, wait])` ### Parameters |Type|Parameter|Description| |--|--|--| |String |`wavFile` | A filepath or URL that represents a wav file.| |double| `volume` | The clip's volume, represented as a floating point number between 0.0 and 1.0. [optional]| |boolean |`wait` | A boolean flag indicating whether or not the call to playSoundClip should wait for the clip to finish before it returns. [optional]| ### Returns Nothing ### Scope Client ## Code Examples ```python title="Example #1" # This code would play a sound clip at full volume that was located on the current # host's filesystem. It will not return until the clip in finished playing. system.util.playSoundClip("C:\\sounds\\siren.wav") ``` ```python title="Example #2" # This code would pull a sound clip out of a BLOB field from a database, # playing it asynchronously at half volume. query = "SELECT wavBlob FROM sounds WHERE type='alert_high'" soundData = system.db.runScalarQuery(query) system.util.playSoundClip(soundData, 0.5, 0) ```