> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inworld.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Inworld TTS Module

[Overview](../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

* [SynthesisConfig](#synthesisconfig)
* [Voice](#voice)

## Methods

* [TextToSpeech](#texttospeech)
* [TextToSpeechAsync](#texttospeechasync)
* [SetVoice](#setvoice)

## 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

| Parameter | Type     | Description                                       |
| --------- | -------- | ------------------------------------------------- |
| text      | `string` | The text content to convert to speech.            |
| speakerID | `string` | The 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

| Parameter | Type     | Description                                       |
| --------- | -------- | ------------------------------------------------- |
| text      | `string` | The text content to convert to speech.            |
| speakerID | `string` | The 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

| Parameter | Type     | Description                                         |
| --------- | -------- | --------------------------------------------------- |
| voiceID   | `string` | The 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)

***
