Skip to main content

LiveKit Agents plugin for SonexLabs Text-to-Speech (TTS)

Project description

livekit-plugins-sonex

LiveKit Agents plugin for SonexLabs Text-to-Speech.

This package allows LiveKit Agents to synthesize speech using SonexLabs' TTS API through the standard LiveKit plugin interface.


Features

  • Native LiveKit Agents integration
  • Async HTTP client
  • High-quality SonexLabs voices
  • Supports LiveKit AgentSession
  • Simple pip installation

Installation

pip install livekit-plugins-sonex

For local development:

git clone https://github.com/sonexlabs/livekit-plugins-sonex.git
cd livekit-plugins-sonex

pip install -e .

Authentication

The plugin requires a SonexLabs API key.

You can either pass it directly:

tts = sonex.TTS(
    api_key="vsk_xxxxxxxxx",
    voice_id="YOUR_VOICE_ID",
)

or configure it as an environment variable.

Linux/macOS

export SONEX_API_KEY=vsk_xxxxxxxxx

Windows PowerShell

$env:SONEX_API_KEY="vsk_xxxxxxxxx"

Usage

from livekit.agents import AgentSession
from livekit.plugins import sonex

session = AgentSession(
    tts=sonex.TTS(
        voice_id="YOUR_VOICE_ID",
    ),
)

Parameters

Parameter Description
api_key Sonex API key (optional if SONEX_API_KEY is set)
voice_id Sonex voice ID
model TTS model (default: panini)
sample_rate Output sample rate (default: 24000 Hz)

Requirements

  • Python 3.10+
  • livekit-agents

License

Apache-2.0

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_sonex-0.1.0.tar.gz (10.0 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_sonex-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_sonex-0.1.0.tar.gz.

File metadata

  • Download URL: livekit_plugins_sonex-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for livekit_plugins_sonex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18a7f5742c1b3dd2c6d99da9486d24bd6c789761272259280147c82fb790b3c2
MD5 f538a4c388aad23e83cd6dfdb5baf702
BLAKE2b-256 9d5e5cd560e7526c2ce1eb3022c94ec8736c75ae9be8ee929e4f1e4463a0c51b

See more details on using hashes here.

File details

Details for the file livekit_plugins_sonex-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_sonex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64bdfcc876fca78c10c4703bb8701285d21f61bf9b65b678021973e4050f72db
MD5 8ff67a3adb0478193a70552ff383f325
BLAKE2b-256 70a5934b18616b86db83b37fd1a1c54ec46237e52c7389dc430f440b93a8db64

See more details on using hashes here.

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