Agent Framework plugin for services using Gladia's API.
Project description
Gladia plugin for LiveKit Agents
Support for speech-to-text with Gladia.
See https://docs.livekit.io/agents/integrations/stt/gladia/ for more information.
Installation
pip install livekit-plugins-gladia
Pre-requisites
You'll need an API key from Gladia. It can be set as an environment variable: GLADIA_API_KEY
Features
- Streaming speech-to-text
- Multi-language support
- Code-switching between languages
- Interim results (partial transcriptions)
- Voice activity detection with energy filtering
- Optional real-time translation
- Customizable audio parameters (sample rate, bit depth, channels, encoding)
Example Usage
from livekit.stt import STT
from livekit.plugins.gladia.stt import STT as GladiaSTT
# Basic initialization
stt = GladiaSTT(
api_key="your-api-key-here", # or use GLADIA_API_KEY env var
interim_results=True
)
# With more options
stt = GladiaSTT(
languages=["en", "fr"], # Specify languages or let Gladia auto-detect
code_switching=True, # Allow switching between languages during recognition
sample_rate=16000, # Audio sample rate in Hz
bit_depth=16, # Audio bit depth
channels=1, # Number of audio channels
encoding="wav/pcm", # Audio encoding format
energy_filter=True, # Enable voice activity detection
translation_enabled=True,
translation_target_languages=["en"],
translation_model="base",
translation_match_original_utterances=True
)
# Update options after initialization
stt.update_options(
languages=["ja", "en"],
translation_enabled=True,
translation_target_languages=["fr"]
)
Using with LiveKit Agents Framework
from livekit.agents import Agent
from livekit.plugins.gladia.stt import STT as GladiaSTT
agent = Agent(
stt=GladiaSTT(
api_key="your-api-key-here",
languages=["en"],
translation_enabled=True,
translation_target_languages=["es"]
)
)
# Rest of your agent setup...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file livekit_plugins_gladia-1.0.22.tar.gz
.
File metadata
- Download URL: livekit_plugins_gladia-1.0.22.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aec63888720ede6f5f18d70aa0aead55b0458076efabc56d6efd79f84dd46269 |
|
MD5 | d2d1c56d2263ec347ef11fe8c46bf747 |
|
BLAKE2b-256 | 47100dbd94693bcd3db1b6b90c78685e28eda8353f1d5f695ea0c7f140baa67d |
File details
Details for the file livekit_plugins_gladia-1.0.22-py3-none-any.whl
.
File metadata
- Download URL: livekit_plugins_gladia-1.0.22-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e4f848c591f16d9bb84f9b8fdec6cf8359f08866f7c3ed423e28417b85c2f5d |
|
MD5 | 849c929982a6ee822b9df7c464798de5 |
|
BLAKE2b-256 | 2113b2da9ba1fc2da01e65f4f76610ca552addd66f5df74f5e4a861cc8e776db |