Overview
Inworld provides high-quality, low-latency speech synthesis via two implementation types:InworldTTSService for real-time, minimal-latency use-cases through websockets and InworldHttpTTSService for streaming and non-streaming use-cases over HTTP. Featuring support for 12+ languages, timestamps, custom pronunciation and instant voice cloning.
Models
The default model is Realtime TTS-2 (inworld-tts-2).
Inworld TTS API Reference
Pipecat’s API methods for Inworld TTS integration
Example Implementation (Websockets)
Complete example with Inworld TTS
Inworld Documentation
Official Inworld TTS API documentation
Inworld Portal
Create and manage voice models
Installation
To use Inworld services, no additional dependencies are required beyond the base installation:Prerequisites
Inworld Account Setup
Before using Inworld TTS services, you need:- Inworld Account: Sign up at Inworld Studio
- API Key: Generate an API key from your account dashboard
- Voice Selection: Choose from available voice models
Required Environment Variables
INWORLD_API_KEY: Your Inworld API key for authentication
Configuration
InworldTTSService
WebSocket-based service for lowest latency streaming.Deprecated since 0.0.105, removed in 2.0.0. Use
settings=InworldTTSService.Settings(voice=...) instead.Deprecated since 0.0.105, removed in 2.0.0. Use
settings=InworldTTSService.Settings(model=...) instead.Audio encoding requested from Inworld. The service pushes the returned bytes
as 16-bit mono PCM, so use an uncompressed 16-bit encoding such as the
default.
Whether the Inworld server controls flushing of buffered text. When
None,
follows the deprecated aggregate_sentences, or True if that isn’t set.Text normalization setting sent to Inworld. When
None, it isn’t sent, so
Inworld’s default applies.How Inworld delivers word timestamps:
"ASYNC" or "SYNC". None omits it
from the request.Maximum time in milliseconds the server buffers text before synthesizing it
when
auto_mode is off. When None, 3000 is used.Number of buffered characters that triggers synthesis. When the server splits
streamed tokens at sentence boundaries (see
text_aggregation_mode), it also
cuts sentences longer than this. When None, 250 is used, or Inworld’s
default in that case.Controls how incoming text is aggregated before synthesis.
SENTENCE (used
when None) buffers text until sentence boundaries, producing more natural
speech. TOKEN streams tokens directly for lower latency; with auto_mode
enabled on an inworld-tts-2 model, the server splits the streamed tokens at
sentence boundaries. Import from pipecat.services.tts_service.Deprecated since 0.0.104, removed in 2.0.0. Use
text_aggregation_mode
instead.Deprecated since 0.0.105, removed in 2.0.0. Use
settings=InworldTTSService.Settings(...) instead.Runtime-configurable settings. See InworldTTSService
Settings below.
InworldTTSService Settings
Runtime-configurable settings passed via thesettings constructor argument using InworldTTSService.Settings(...). These can be updated mid-conversation with TTSUpdateSettingsFrame. On InworldTTSService, any change reconnects the WebSocket, so audio not yet received for the current response is dropped. See Service Settings for details.
InworldHttpTTSService
HTTP-based service supporting both streaming and non-streaming modes.Deprecated since 0.0.105, removed in 2.0.0. Use
settings=InworldHttpTTSService.Settings(voice=...) instead.Deprecated since 0.0.105, removed in 2.0.0. Use
settings=InworldHttpTTSService.Settings(model=...) instead.Audio encoding requested from Inworld. The service pushes the returned bytes
as 16-bit mono PCM, so use an uncompressed 16-bit encoding such as the
default.
How Inworld delivers word timestamps:
"ASYNC" or "SYNC". None omits it
from the request.Deprecated since 0.0.105, removed in 2.0.0. Use
settings=InworldHttpTTSService.Settings(...) instead.Runtime-configurable settings. See InworldTTSService
Settings below.
Usage
Basic Setup (WebSocket)
With Custom Settings
HTTP Service
Notes
- WebSocket vs HTTP: The WebSocket service (
InworldTTSService) provides the lowest latency with bidirectional streaming and supports multiple independent audio contexts per connection (max 5). The HTTP service supports both streaming and non-streaming modes via thestreamingparameter. - Word timestamps: Both services provide word-level timestamps for synchronized text display. Timestamps are tracked cumulatively across utterances within a turn. When timestamps are not received from the service, a fallback mechanism ensures the full text is still committed to the LLM conversation context, even on interruption.
- Auto mode: When
auto_mode=True(default), the server controls flushing of buffered text for optimal latency and quality. This is recommended when text is sent in full sentences or phrases (i.e., when usingtext_aggregation_mode=TextAggregationMode.SENTENCE). - Keepalive: The WebSocket service sends periodic keepalive messages every 60 seconds to maintain the connection.
- Pronunciation hints: Inworld reads IPA between slashes (e.g.,
/kriːt/), one word per pair of slashes. Only English IPA symbols are supported.
Event Handlers
InworldTTSService supports the standard service connection events: