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

# voicePrompt

A mode that indicates that your app plays audio using text-to-speech.

```
static let voicePrompt: AVAudioSession.Mode
```

## Discussion

Setting this mode allows for different routing behaviors when your app connects to certain audio devices, such as CarPlay. An example of an app that uses this mode is a turn-by-turn navigation app that plays short prompts to the user.

Typically, apps of the same type also configure their sessions to use the [`duckOthers`](/documentation/AVFAudio/AVAudioSession/CategoryOptions-swift.struct/duckOthers) and [`interruptSpokenAudioAndMixWithOthers`](/documentation/AVFAudio/AVAudioSession/CategoryOptions-swift.struct/interruptSpokenAudioAndMixWithOthers) options.

---

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)