Instance Property

duration

The number of seconds it took for the user to speak the utterance represented by the segment.

Declaration

var duration: TimeInterval { get }

Discussion

The duration contains the number of seconds it took for the user to speak the one or more words (utterance) represented by the segment. For example, the SFSpeechRecognizer sets duration to 0.6 if the user took 0.6 seconds to say “time” in the transcription of “What time is it?".

See Also

Getting the Audio Timing Information

var timestamp: TimeInterval

The start time of the segment in the processed audio stream.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software