Skip to main content

Inworld AI TTS

The Inworld AI TTS provider enables your agent to use Inworld AI's high-quality text-to-speech models for generating natural-sounding voice output.

Installation​

Install the Inworld AI-enabled VideoSDK Agents package:

pip install "videosdk-plugins-inworldai"

Importing​

from videosdk.plugins.inworld import InworldAITTS

Authentication​

The Inworld plugin requires an Inworld API key.

Set INWORLD_API_KEY in your .env file.

Example Usage​

from videosdk.plugins.inworldai import InworldAITTS
from videosdk.agents import CascadingPipeline

# Initialize the Inworld AI TTS model
tts = InworldAITTS(
api_key="your-api-key",
voice_id="Hades",
model_id="inworld-tts-1"
)

# Add tts to cascading pipeline
pipeline = CascadingPipeline(tts=tts)
note

When using .env file for credentials, don't pass them as arguments to model instances or context objects. The SDK automatically reads environment variables, so omit api_key and other credential parameters from your code.

Configuration Options​

  • model_id: (str) Inworld TTS model identifier (default: "inworld-tts-1").
  • voice_id: (str) Voice identifier to use (default: "Hades").
  • temperature: (float) Sampling temperature for variation in prosody (default: 0.8).
  • api_key: (str) Inworld API key. Can also be set via the INWORLD_API_KEY environment variable.

Additional Resources​

The following resources provide more information about using Inworld with VideoSDK Agents SDK.

Got a Question? Ask us on discord