Agent Framework plugin for services using IndusLabs API.
Project description
IndusLabs plugin for LiveKit Agents
This repository contains a plugin that enables the LiveKit Agents framework to use IndusLabs for both text‑to‑speech (TTS) and speech‑to‑text (STT) services. By packaging the integration as a standard Python module you can install it with pip and immediately register it with your LiveKit agent.
Features
- Text‑to‑Speech (TTS) – synthesize natural‑sounding speech from text using IndusLabs models. Streaming support is provided so that audio begins playing as soon as the first bytes arrive.
- Speech‑to‑Text (STT) – transcribe speech to text in real time. The plugin uses a voice activity detector to segment utterances and sends them to the IndusLabs transcription API.
- Drop‑in installation – simply run
pip install livekit‑plugins‑induslabsand import the plugin in your agent. The plugin automatically registers itself with the LiveKit plugin registry.
Installation
Ensure you have Python 3.8 or newer installed. Then run:
pip install livekit-plugins-induslabs
The package depends on the livekit-agents library and uses
aiohttp, numpy and webrtcvad under the hood. These
dependencies will be installed automatically.
You will also need an API key from IndusLabs. Set the
INDUSLABS_API_KEY environment variable before using the plugin or
pass the key explicitly when constructing the TTS class.
Usage
Import the plugin classes and pass them into your AgentSession:
from livekit.plugins.induslabs import TTS, STT
# Create instances (reads API key from INDUSLABS_API_KEY if not given)
tts = TTS(voice="Indus-hi-Urvashi")
stt = STT(sample_rate=16000)
session = AgentSession(
stt=stt,
tts=tts,
# ... other components like llm, etc.
)
# run session...
Text‑to‑Speech streaming
response_stream = tts.stream()
response_stream.push("नमस्ते!")
async for event in response_stream:
# Handle audio bytes from the emitter
Speech‑to‑Text streaming
speech_stream = stt.stream()
async for event in speech_stream:
if event.type == SpeechEventType.FINAL_TRANSCRIPT:
print("Final transcript:", event.alternatives[0].text)
Contributing
This project is provided as a reference integration for IndusLabs. If you encounter issues or have feature suggestions please open an issue or submit a pull request on GitHub.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livekit_plugins_induslabs-0.0.2.tar.gz.
File metadata
- Download URL: livekit_plugins_induslabs-0.0.2.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1417faa955b57e3a54cc7ca0bef6e8186e64ef128cfd6504a38d8a455eea4fa1
|
|
| MD5 |
31e9df0e01d8c0a9660f3602b06a5339
|
|
| BLAKE2b-256 |
2d34dbd51ace3e888128a6776a419542299d08c9f0736b4e9602a42d310f4ad1
|
File details
Details for the file livekit_plugins_induslabs-0.0.2-py3-none-any.whl.
File metadata
- Download URL: livekit_plugins_induslabs-0.0.2-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eccf29a606898f4fcba22cc65d7a961a6b34e90837fe01cf391052f8173cfea8
|
|
| MD5 |
fef63c29c6c41e6c332d395d8d7b4152
|
|
| BLAKE2b-256 |
8e8fe7f6a41bf3fb9f0b0fd9cd8f91db489eb1949d268ae112b21ca2dd1add9d
|