skipSSPlayback
Navigates synthesized speech using text structure rather than only elapsed playback time.
Declaration
public func skipSSPlayback(
_ skipType: STSSSkipType,
targetText: String? = nil,
direction: STAudioSkipDirection = .forward,
count: Int = 1
) -> STResultOverview
Navigates synthesized speech using text structure rather than only elapsed playback time. Check the documented prerequisites, parameters and return value below. For asynchronous operations, use the relevant media events to observe actual completion rather than treating an accepted request as finished.
Parameters
skipType
The semantic navigation operation to perform.
STSSSkipType supports the beginning or ending of content, the previous location, phrase/paragraph/page/ section indexes and counts, structural beginnings, and locations containing specified text.
targetText
Text to locate when the selected skipType performs text-based navigation.
Default: nil.
direction
The direction in which applicable navigation/search operations proceed.
Default: .forward.
count
The number of matching structural units or targets to skip when the selected operation uses a count.
Default: 1.
Return value
Returns .audioPlayerNotInitialized when the player is unavailable. Otherwise returns the result of the synthesis-navigation operation. A requested text/structure location that cannot be resolved may return .textLocationNotFound.