A part of the entire hypothesized transcription.


Use the properties of a transcription segment to get details, such as where the segment occurs in the overall transcription and how likely it is that the hypothesized recognition is accurate.

For example, consider the hypothesized transcription "What time is it." The first segment (that is, "What") might have a substringRange value of {0,4}, a duration of .6 seconds, and a timestamp of 1.0. These values can be interpreted as follows: "What" begins at position 0 in the substring and has a length of four characters. The utterance began at the one second mark and took .6 seconds to say. If the second segment (that is, "time") has a timestamp of 1.6, you know that the user said "time" immediately after saying "What."


Working with Transcription Accuracy and Alternatives

var confidence: Float

The level of confidence in the accuracy of the recognition for this transcription segment.

var alternativeSubstrings: [String]

An array of possible interpretations of the utterance in this transcription segment.

Accessing the Attributes of a Transcription

var substring: String

A string representation of the utterance in this transcription segment.

var substringRange: NSRange

The range information for this transcription segment's substring within the overall hypothesized recognition.

var duration: TimeInterval

The duration of the utterance in this transcription segment, measured from the start of the utterance.

var timestamp: TimeInterval

The timestamp at the start of the utterance in this transcription segment.


Inherits From

See Also

Working with Recognition Results and Transcriptions

class SFSpeechRecognitionResult

A recognized utterance that corresponds to a segment of recorded speech and that contains one or more transcription hypotheses.

class SFTranscription

A hypothesized textual representation of recognized speech.

protocol SFSpeechRecognitionTaskDelegate

A protocol that supports complex or multi-utterance speech recognition requests.

protocol SFSpeechRecognizerDelegate

A protocol that helps you track the availability of a speech recognizer.