These types are iOS-only and will have no effect on Android.
AudioSessionCategoryIos
Enum defining iOS audio session categories. Based on AVAudioSessionCategory.Mix with other audio. Audio continues even when the device is locked or the silent switch is on.
Default category. Silences other audio but allows playback when device is unlocked.
For playing recorded audio or other media. Silences other audio.
For recording audio only. Silences playback audio.
For simultaneous recording and playback. Common for VoIP and voice chat apps.
For routing audio to multiple outputs simultaneously (e.g., USB and HDMI).
AudioSessionCategoryOptionIos
Enum defining iOS audio session category options. Based on AVAudioSessionCategoryOptions.Allow audio from this session to mix with audio from other apps.
Lower the volume of other audio sessions while this session is active.
Interrupt spoken audio content (like podcasts) but mix with other audio.
Allow Bluetooth hands-free devices to appear as available input routes.
Allow Bluetooth A2DP devices to appear as available output routes.
Allow AirPlay devices to appear as available output routes.
Route audio to the built-in speaker instead of the receiver.
AudioSessionModeIos
Enum defining iOS audio session modes. Based on AVAudioSessionMode.Default audio session mode.
Optimized for two-way voice communication (e.g., VoIP).
Optimized for video chat applications.
Optimized for in-game voice chat.
Optimized for recording video with audio.
For audio input/output measurements. Minimizes system audio processing.
Optimized for playing back video content.
For spoken audio content like podcasts or audiobooks.
AudioSessionSettingIos
Interface combining audio session configuration properties.The audio session category.
Array of category options to apply.
The audio session mode.
Whether to activate the audio session.
Usage Example
With Realtime Transcription
Manual Audio Session Control
Common Configurations
Voice Recording
VoIP Application
Background Audio Mixing
Notes
- Audio session changes only affect iOS devices
- Use
'restore'foraudioSessionOnStopIosto automatically restore the previous state - The
AudioSessionIosutility is deprecated - prefer usingaudioSessionOnStartIos/audioSessionOnStopIosoptions - Changing audio session settings may require microphone permissions
Related
- RealtimeTranscriber - Modern realtime transcription API
- transcribeRealtime() - Deprecated realtime transcription method