SpeechTranscriber.Preset
Predefined transcriber configurations.
Declaration
struct PresetOverview
You can configure a transcriber with a preset, or modify the values of a preset’s properties and configure a transcriber with the modified values. You can also create your own presets by extending this type.
It is not necessary to use a preset at all; you can also use the transcriber’s designated initializer to completely customize its configuration.
This example configures a transcriber according to the timeIndexedTranscriptionWithAlternatives preset, but adds etiquette filtering and removes alternative transcriptions:
let preset = SpeechTranscriber.Preset.timeIndexedTranscriptionWithAlternatives
let transcriber = SpeechTranscriber(
locale: Locale.current,
transcriptionOptions: preset.transcriptionOptions.union([.etiquetteReplacements])
reportingOptions: preset.reportingOptions.subtracting([.alternativeTranscriptions])
attributeOptions: preset.attributeOptions
)This table lists the presets and their configurations:
Preset | ||||
|---|---|---|---|---|
| No | No | No | No |
| No | No | Yes | No |
| No | No | Yes | Yes |
| Yes | Yes | No | No |
| Yes | Yes | No | Yes |
Topics
Standard presets
transcriptiontranscriptionWithAlternativestimeIndexedTranscriptionWithAlternativesprogressiveTranscriptiontimeIndexedProgressiveTranscription