Skip to main content
The Android emulator routes audio played on the runner host through to the emulator’s microphone input. Use 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 microphone
Pull a recording off the emulator

When 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.

Full sample test

Last modified on June 10, 2026