Neopixel Blaster icon Neopixel Blaster DIY NeoPixel Blaster for ARC - open-source controller for up to 8×80 LEDs (640), port‑0 onboard RGB, color control via ControlCommand 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