<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioSession/Mode-swift.struct/voiceChat",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:@AVAudioSessionModeVoiceChat"
  },
  "title" : "voiceChat"
}
-->

# voiceChat

A mode that indicates that your app is performing two-way voice communication, such as using Voice over Internet Protocol (VoIP).

```
static let voiceChat: AVAudioSession.Mode
```

## Discussion

This mode is appropriate for Voice over IP (VoIP) apps that use the [`playAndRecord`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/playAndRecord) category. When you set this mode, the session optimizes the device’s tonal equalization for voice and reduces the set of allowed audio routes to only those suitable for voice chat. Setting this mode also causes the system to automatically apply the [`allowBluetoothHFP`](/documentation/AVFAudio/AVAudioSession/CategoryOptions-swift.struct/allowBluetoothHFP) category option.

VoIP apps should also use the <doc://com.apple.documentation/documentation/AudioToolbox/audio-unit-voice-i-o> as it provides useful voice features, including automatic gain correction, adjustment of voice processing, and muting. When an app uses this Audio Unit without explicitly setting its mode to a chat variant (voice, video, or game), the session sets the [`voiceChat`](/documentation/AVFAudio/AVAudioSession/Mode-swift.struct/voiceChat) mode implicitly. However, if an app previously set its category to [`playAndRecord`](/documentation/AVFAudio/AVAudioSession/Category-swift.struct/playAndRecord) and mode to [`videoChat`](/documentation/AVFAudio/AVAudioSession/Mode-swift.struct/videoChat) or [`gameChat`](/documentation/AVFAudio/AVAudioSession/Mode-swift.struct/gameChat), instantiating the Audio Unit doesn’t cause the mode to change.

For apps that use one or more chat modes (voice, video, or game), but don’t use <doc://com.apple.documentation/documentation/AudioToolbox/audio-unit-voice-i-o> or [`AVAudioEngine`](/documentation/AVFAudio/AVAudioEngine) with [`setVoiceProcessingEnabled(_:)`](/documentation/AVFAudio/AVAudioIONode/setVoiceProcessingEnabled(_:)), the system reduces the processing it applies to audio signals. Specifically, it doesn’t apply voice-specific processing, like echo cancellation and automatic gain correction, and disables dynamic processing on input and output, which results in a lower playback level.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)