Skip to main content
Listen to the sound emitted by an iOS simulator or Android emulator. Audio works with any video codec. Each viewer starts muted; enabling sound affects that viewer only. The simulator’s volume controls still apply.

Listen in the browser

Open the signed session viewer and press Unmute simulator audio. Press Mute simulator audio to stop playback immediately. Reconnecting a viewer starts muted again. Browsers may require a click inside the simulator before allowing sound. If playback is blocked, click inside the viewer and enable sound again. A capture failure appears as an audio error while the simulator remains usable.

Control an embedded viewer

The React ref exposes setAudioMuted(muted). onAudioStatus reports muted, connecting, playing, blocked, or unavailable.
The return value indicates whether the message could be sent. Use onAudioStatus to confirm playback. Preserve the default allow policy, which includes autoplay; include autoplay if you override it. For a raw iframe, send { type: "run-cloud:audio-control", muted: false } to the signed URL’s exact origin. Receive run-cloud:audio-status with state, muted, and an optional error. Verify both event.source and event.origin against the current iframe. See Embed a Simulator.

Stream speaker output with the SDK

cloud.ios.streamAudio, cloud.android.streamAudio, and cloud.simulators.streamAudio return an async generator of SimulatorAudioFrame. Each frame contains pcm bytes, sampleRate: 44100, channels: 2, and format: "s16le": interleaved signed 16-bit little-endian stereo samples. Silence is valid audio; receiving a frame alone does not prove that an app is emitting sound.
Breaking out of the loop or aborting closes capture. The metered simulator session remains active until you release it. The generic client accepts { platform: "ios" | "android", signal }, with iOS as its default platform.

Record a WAV with the CLI

The session must be active. --duration defaults to 10 seconds and accepts 0.1 to 60 seconds. Output is a stereo, 44.1 kHz, 16-bit PCM WAV. The CLI preserves silence gaps and refuses to overwrite an existing output file. Press Ctrl+C to cancel capture. Release the session separately when finished. Viewer mute controls only browser playback. SDK and CLI capture can run while the viewer is muted. This is speaker output; use microphone injection when you need to send prerecorded sound into an app’s microphone.