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 current instance of the TextToSpeechEngine with a new one.

    Declaration

    Swift

    func changeTTsEngine(to ttsEngine: TextToSpeechEngine)
  • Replaces the language code of the TextToSpeechEngine with a new one.

    Declaration

    Swift

    func changeLanguage(languageCode: String)
  • Play the message.

    Declaration

    Swift

    func play(message: TTSMessage, priority: TTSMessagePriority)
  • Stop playing the voice message.

    Declaration

    Swift

    func stop()
  • Set the speech volume.

    Declaration

    Swift

    func setVolume(_ volume: SpeechVolume)