Play Sound From Folder
Parameters
Application Default
Select 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
true
Wait 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.
false
Include all subdirectories within the selected folder
100
Adjust 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
The following variables will be populated after executing this sub-action:
Description | ||
---|---|---|
randomSoundFile | string | Full path of the audio file that was randomly selected for playback Example: C:\ScaryNoises\chad.mp3 |
randomSoundFileName | string | File name of the audio file that was randomly selected for playback Example: chad.mp3 |
C# Usage
public double PlaySoundFromFolder(string path, Single volume = 1, bool recursive = false, bool finishBeforeContinuing = false, string name, bool useFileName = true)