Class

SFTranscription

A textual representation of the given speech it its entirety, as recognized by the speech recognizer.

Declaration

@interface SFTranscription : NSObject

Overview

Use SFTranscription to obtain all the recognized utterances from your audio content. An utterance is a vocalized word or group of words that represent a single meaning to the speech recognizer (SFSpeechRecognizer).

Use the formattedString property to retrieve the entire transcription of utterances, or use the segments property to retrieve an individual utterance (SFTranscriptionSegment).

You don’t create an SFTranscription directly. Instead, you retrieve it from an SFSpeechRecognitionResult instance. The speech recognizer sends a speech recognition result to your app in one of two ways, depending on how your app started a speech recognition task.

You can start a speech recognition task by using the speech recognizer’s recognitionTaskWithRequest:resultHandler: method. When the task is complete, the speech recognizer sends an SFSpeechRecognitionResult instance to your resultHandler closure. Alternatively, you can use the speech recognizer’s recognitionTaskWithRequest:delegate: method to start a speech recognition task. When the task is complete, the speech recognizer uses your SFSpeechRecognitionTaskDelegate to send a SFSpeechRecognitionResult by using the delegate’s speechRecognitionTask:didFinishRecognition: method.

An SFTranscription represents only a potential version of the speech. It might not be an accurate representation of the utterances.

Topics

Transcribing the Utterances

formattedString

The entire transcription of utterances, formatted into a single, user-displayable string.

Getting Individual Utterances

segments

An array of transcription segments that represent the parts of the transcription, as identified by the speech recognizer.

Getting Transcription Measurements

averagePauseDuration

The average pause duration between words, measured in seconds.

speakingRate

The number of words spoken per minute.

Relationships

Inherits From

See Also

Transcription Results

SFSpeechRecognitionResult

An object containing the partial or final results of a speech recognition request.

SFTranscriptionSegment

A discrete part of an entire transcription, as identified by the speech recognizer.