device.passAudioAsMicrophoneInput(...) to play an audio file during a flow — your app will receive it as microphone input.
Store your audio file in team storage and reference it via
process.env.TEAM_STORAGE_DIR. See Upload files for instructions.Examples
Inject audio into the microphoneWhen to use
- Your app records audio or processes microphone input and you need to test that flow with known audio data.
- Your app has voice commands or speech recognition features.
- Your app validates or analyzes microphone input.
- Your test needs to run the same audio scenario repeatedly with consistent inputs.
Options
passAudioAsMicrophoneInput accepts delaySeconds (wait before playback starts) and durationSeconds (cap playback length; omit to play the whole file). See the Android Device Reference for the full signature.