Skip to main content
Skip table of contents

TtsModule

The TtsModule class manages text-to-speech functionality, allowing the system to generate spoken audio from text.

Methods

public void SendText(string text, string lang = null)

  • Description: Sends text to be converted into speech.

  • Parameters:

    • string text: The text to be spoken.

    • string lang: An optional language code. If not provided, it uses the currently set language.

public void SetLanguage(string language, string voice, string tts = "polly", bool neural = true)

  • Description: Sets the language and voice for the text-to-speech system. This method internally makes two separate calls: one to set the language and another to configure the TTS provider, voice, and neural setting.

  • Parameters:

    • string language: The language code (e.g., 'en-US').

    • string voice: The name of the specific voice to use (e.g., 'Matthew').

    • string tts: The text-to-speech provider. Defaults to "polly".

    • bool neural: A flag indicating whether to use a neural voice. Defaults to true.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.