TextToSpeech
public protocol TextToSpeech : AnyObject
TextToSpeech
manages the TTS engine.
Important
This is a Public Preview API. It may be changed or removed at any time.Replaces the locale of the TextToSpeechEngine
with a new one.
Throws
TextToSpeechEngineError.unavailableLocaleInVoices
if there is no speech voice for the given locale
.
Declaration
Swift
func changeLanguage(locale: Locale) throws
Replaces the current instance of the TextToSpeechEngine
with a new one.
Declaration
Swift
func changeTTsEngine(to ttsEngine: TextToSpeechEngine)
Play the message.
Declaration
Swift
func play(message: TTSMessage, priority: TTSMessagePriority)
Set the speech volume.
Declaration
Swift
func setVolume(_ volume: SpeechVolume)
Stop playing the voice message.
Declaration
Swift
func stop()