<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CarPlay",
  "identifier" : "/documentation/CarPlay/CPVoiceControlTemplate",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "CarPlay"
    ],
    "preciseIdentifier" : "c:objc(cs)CPVoiceControlTemplate"
  },
  "title" : "CPVoiceControlTemplate"
}
-->

# CPVoiceControlTemplate

A template that displays a voice control indicator during audio input.

```
@MainActor class CPVoiceControlTemplate
```

## Overview

CarPlay navigation apps must show a voice control indicator during audio input by presenting a voice control template. When creating the template, provide one or more [`CPVoiceControlState`](/documentation/CarPlay/CPVoiceControlState) objects. To switch between states, call the [`activateVoiceControlState(withIdentifier:)`](/documentation/CarPlay/CPVoiceControlTemplate/activateVoiceControlState(withIdentifier:)) method.

## Topics

### Creating a Voice Control Template

[`-  initWithVoiceControlStates:`](/documentation/CarPlay/CPVoiceControlTemplate/init(voiceControlStates:))

Creates a voice control template with a list of voice control states.

[`CPVoiceControlState`](/documentation/CarPlay/CPVoiceControlState)

A voice control state containing title variants and images for use by a voice control template.

### Activating a State

[`-  activateVoiceControlStateWithIdentifier:`](/documentation/CarPlay/CPVoiceControlTemplate/activateVoiceControlState(withIdentifier:))

Changes the template’s state to the one matching the specified identifier.

[`activeStateIdentifier`](/documentation/CarPlay/CPVoiceControlTemplate/activeStateIdentifier)

The identifier of the template’s current voice control state.

### Getting Available States

[`voiceControlStates`](/documentation/CarPlay/CPVoiceControlTemplate/voiceControlStates)

The array of voice control states available to the template.

## Relationships

### Conforms To

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CPBarButtonProviding`](/documentation/CarPlay/CPBarButtonProviding)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`CPTemplate`](/documentation/CarPlay/CPTemplate)

---

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)