Use device.startSpeakerRecording() to capture audio output from the iOS device speaker while your app is playing audio. The recording is saved as a WAV file that can be downloaded and analyzed.
See the iOS Device Reference for the full API.
Examples
Record and download speaker audio
When to use
- Your app plays audio and you need to verify the correct sound or track played.
- Your app uses text-to-speech and you need to validate the spoken output.
- Your app plays audio prompts and you need to confirm they play correctly after an update.
- Your test needs to capture audio output for comparison against a known reference.
Analyzing the recording
To compare the recording against a reference file, see Audio analysis (iOS).
stopSpeakerRecording() automatically calculates a Chromaprint fingerprint and includes it as file.fingerprint. You can use this directly for audio analysis without calling calculateAudioFingerprint() separately.
Full sample test