speechSynthesisOutputMetadataBlock
A block that subclasses use to send marker information to the host.
Declaration
var speechSynthesisOutputMetadataBlock: AVSpeechSynthesisProviderOutputBlock? { get set }Discussion
A host sets this block to retrieve metadata for a request.
A synthesizer calls this method when it produces data relevant to the audio buffers it’s sending back to a host. In some cases, the system may delay speech output until it delivers these markers. For example, word highlighting depends on marker data from synthesizers to time what word to highlight. The array of markers can reference audio buffers that the system delivers at a later time.
There may be cases where a subclass doesn’t have marker data until it completes extra audio processing. If marker data changes, this block replaces that audio buffer range’s marker data.