Skip to main content

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‑induslabs and 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


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_induslabs-0.0.2.tar.gz (11.7 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_induslabs-0.0.2-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_induslabs-0.0.2.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_induslabs-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1417faa955b57e3a54cc7ca0bef6e8186e64ef128cfd6504a38d8a455eea4fa1
MD5 31e9df0e01d8c0a9660f3602b06a5339
BLAKE2b-256 2d34dbd51ace3e888128a6776a419542299d08c9f0736b4e9602a42d310f4ad1

See more details on using hashes here.

File details

Details for the file livekit_plugins_induslabs-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_induslabs-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eccf29a606898f4fcba22cc65d7a961a6b34e90837fe01cf391052f8173cfea8
MD5 fef63c29c6c41e6c332d395d8d7b4152
BLAKE2b-256 8e8fe7f6a41bf3fb9f0b0fd9cd8f91db489eb1949d268ae112b21ca2dd1add9d

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