Skip to main content

Agent Framework plugin for voice synthesis with Inworld's API.

Project description

Inworld plugin for LiveKit Agents

Support for voice synthesis with Inworld TTS.

See https://docs.livekit.io/agents/integrations/tts/inworld/ for more information.

Installation

pip install livekit-plugins-inworld

Authentication

Set INWORLD_API_KEY in your .env file (get one here).

Usage

Use Inworld TTS within an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.

from livekit.plugins import inworld

tts = inworld.TTS()

Or with options:

from livekit.plugins import inworld

tts = inworld.TTS(
    voice="Hades",                 # voice ID (default or custom cloned voice)
    model="inworld-tts-1",         # or "inworld-tts-1-max"
    encoding="OGG_OPUS",           # LINEAR16, MP3, OGG_OPUS, ALAW, MULAW, FLAC
    sample_rate=48000,             # 8000-48000 Hz
    bit_rate=64000,                # bits per second (for compressed formats)
    speaking_rate=1.0,             # 0.5-1.5
    temperature=1.1,               # 0-2
    timestamp_type="WORD",         # WORD, CHARACTER, or TIMESTAMP_TYPE_UNSPECIFIED
    text_normalization="OFF",      # ON, OFF, or APPLY_TEXT_NORMALIZATION_UNSPECIFIED
)

Streaming

Inworld TTS supports WebSocket streaming for lower latency real-time synthesis. Use the stream() method for streaming text as it's generated:

from livekit.plugins import inworld

tts = inworld.TTS(
    voice="Hades",
    model="inworld-tts-1",
    buffer_char_threshold=100,     # chars before triggering synthesis (default: 100)
    max_buffer_delay_ms=3000,      # max buffer time in ms (default: 3000)
)

# Create a stream for real-time synthesis
stream = tts.stream()

# Push text incrementally
stream.push_text("Hello, ")
stream.push_text("how are you today?")
stream.flush()  # Flush any remaining buffered text
stream.end_input()  # Signal end of input

# Consume audio as it's generated
async for audio in stream:
    # Process audio frames
    pass

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_plugins_inworld-1.5.2.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_plugins_inworld-1.5.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_inworld-1.5.2.tar.gz.

File metadata

  • Download URL: livekit_plugins_inworld-1.5.2.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for livekit_plugins_inworld-1.5.2.tar.gz
Algorithm Hash digest
SHA256 36b5afdb0896633591c4f64c140190afc591c79cabc53b38c17957c3904f205a
MD5 1d76142490a12eeda9ad5c9e155945a6
BLAKE2b-256 a02998cb2ed691173a925463fd3f6c4728893a8041f2934257cc51ddf9a9b5c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_inworld-1.5.2.tar.gz:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file livekit_plugins_inworld-1.5.2-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_inworld-1.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d41cb108141758114f32d1b9eb04e63b306cea69a30e6682f7a0d88d10b813a8
MD5 2b167c048e37da0defcd7f0909fc1db8
BLAKE2b-256 bae748e027f27e626b26db0c05607db08712c83c67506665bc6cc65befbc0835

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_inworld-1.5.2-py3-none-any.whl:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page