Skip to main content
Overview > Inworld TTS Module Class: InworldTTSModule | Inherits from: InworldFrameworkModule Module for Text-to-Speech (TTS) functionality within the Inworld framework. Converts text input into synthesized speech audio using AI-powered voice synthesis. Supports both synchronous and asynchronous speech synthesis operations with customizable voice settings.

Properties

Methods

Reference

SynthesisConfig

Gets the current speech synthesis configuration instance. Contains speech processing parameters and settings for TTS operations.

Returns

Type: SpeechSynthesisConfig Description: The speech synthesis configuration instance with current settings.

Voice

Gets the current voice profile instance. Contains the configured speaker identity for speech synthesis.

Returns

Type: InworldVoice Description: The voice profile instance with current speaker settings.

TextToSpeech

Performs synchronous text-to-speech conversion and immediately plays the result. Converts the provided text to speech audio using the specified speaker voice.

Parameters

ParameterTypeDescription
textstringThe text content to convert to speech.
speakerIDstringThe voice identifier to use for speech synthesis.

Returns

Type: void

TextToSpeechAsync

Performs asynchronous text-to-speech conversion and plays the result when complete. Converts the provided text to speech audio using the specified speaker voice. Provides progress notifications through task events during processing.

Parameters

ParameterTypeDescription
textstringThe text content to convert to speech.
speakerIDstringThe voice identifier to use for speech synthesis.

Returns

Type: void

SetVoice

Sets the voice profile to use for speech synthesis. Configures the speaker identity for subsequent TTS operations.

Parameters

ParameterTypeDescription
voiceIDstringThe voice identifier to set as the current speaker.

Returns

Type: void

Serialized Fields

The following fields are configurable in the Unity Inspector:
  • m_AudioSource (AudioSource) - The Unity AudioSource component used for playing synthesized speech

Configuration Management

Remote Configuration

When using remote TTS services, the module creates a TTSRemoteConfig with:
  • API key from framework utilities (if available)

Local Configuration

When using local TTS models, the module creates a TTSLocalConfig with:
  • Model path (resolved from StreamingAssets folder)
  • Prompt path (resolved from StreamingAssets folder)