Soundboard V2 (PC) icon Soundboard V2 (PC) Play MP3/WAV via PC sound output with timeline scripts to trigger movements, auto-position actions, and optional looping for synced routines Try it →
 

Waitforspeech

Audio.waitForSpeech(timeout, s1, [s2], [s3], [s4], [s5], [s6])

Parameters

timeout Time to wait in seconds before stopping waiting for speech.
s1 String to wait for.
s2 (optional) String to wait for.
s3 (optional) String to wait for.
s4 (optional) String to wait for.
s5 (optional) String to wait for.
s6 (optional) String to wait for.

Returns

The phrase heard if the timeout did not occur in a lowercase string.

Description

Suspends execution of the script until one of the strings specified by s1, s2, s3, s4, s5, or s6 is heard, or a timeout occurs after timeout seconds. If a timeout occurs, the method will return "timeout".

*Note: the returned string is in lowercase