Contents

DictationTranscriber.Preset

Predefined transcriber configurations.

Declaration

struct Preset

Overview

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 shortDictation preset, but adds emoji recognition:

let preset = DictationTranscriber.Preset.shortDictation
let transcriber = DictationTranscriber(
    locale: Locale.current,
    contentHints: preset.contentHints,
    transcriptionOptions: preset.transcriptionOptions.union([.emoji])
    reportingOptions: preset.reportingOptions
    attributeOptions: preset.attributeOptions
)

This table lists the presets and their configurations:

Preset

Shortform

Volatileresults

Frequentfinalization

Audiotimerange

Punctuation

phrase

Yes

No

No

No

No

shortDictation

Yes

No

No

No

Yes

progressiveShortDictation

Yes

Yes

Yes

No

Yes

longDictation

No

No

No

No

Yes

progressiveLongDictation

No

Yes

No

No

Yes

timeIndexedLongDictation

No

No

No

Yes

Yes

Topics

Standard presets

Creating a preset

Getting preset properties

See Also

Creating a transcriber