SpeechTilesAndamento Docs
Get started
SDK Reference · Method

setAudioPlaybackRate

Sets the runtime playback rate.

Declaration

public func setAudioPlaybackRate(_ rate: Float) -> STResult

Overview

Sets the runtime playback rate. 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

rate

The requested playback rate. Valid values are 0.5...2.0; 1.0 is normal speed.

Return value

Returns .audioPlayerNotInitialized when the player is unavailable. An out-of-range value can return .audioPlaybackRateOutsideRange; otherwise the method returns the result of applying the rate.

See Also