Play Sound From Folder
Play a random audio file from a folder

Parameters
Application DefaultSelect an audio device to use for output
Application Default will use the device configured in the Settings tab in Streamer.bot
Select the folder containing the audio files for playback.
Click ... to open a file browser.
Supported formats: mp3, wav
trueWait for playback to complete before continuing to the next sub-action.
When disabled, the sound will play immediately and the next sub-action will begin to execute with no delay.
falseInclude all subdirectories within the selected folder
100Adjust the output volume
This is a simple volume control. It can often be useful to instead adjust the volume with a tool like Audacity.
Enabling this will use the filename of the sound as the sound name
Variables
| Name | Type | Description |
|---|---|---|
Example Value: C:\ScaryNoises\chad.mp3Full path of the audio file that was randomly selected for playback | ||
Example Value: chad.mp3File name of the audio file that was randomly selected for playback | ||
Length of chosen sound in seconds. | ||
Length of chosen sound in milliseconds. |
C# Usage
public double PlaySoundFromFolder(string path, Single volume = 1, bool recursive = false, bool finishBeforeContinuing = false, string name, bool useFileName = true)