Skip to content

Conversation

@robosina
Copy link

@robosina robosina commented Oct 25, 2025

Add Talkscriber Plugin for LiveKit Agents

Overview

This PR introduces a new plugin that integrates Talkscriber's voice AI services into LiveKit Agents, providing both Speech-to-Text (STT) and Text-to-Speech (TTS) capabilities.

Features

Speech-to-Text (STT)

  • ✅ Real-time streaming transcription via WebSocket
  • ✅ Interim and final transcript support
  • ✅ Multilingual support with automatic language detection
  • ✅ Smart turn detection using ML model for better endpoint detection
  • ✅ Translation capabilities
  • ✅ Configurable turn detection timeout

Text-to-Speech (TTS)

  • ✅ High-quality voice synthesis
  • ✅ Multiple voice options
  • ✅ Audio buffering control for latency optimization
  • ✅ Connection pooling for efficient resource management

Configuration & Deployment

  • ✅ Environment variable support for flexible deployment:
    • STT_SERVER_HOST, STT_SERVER_PORT, STT_SERVER_USE_SSL
    • TTS_SERVER_HOST, TTS_SERVER_PORT, TTS_SERVER_USE_SSL
  • ✅ API key authentication via TALKSCRIBER_API_KEY

Installation

pip install livekit-plugins-talkscriber

Or with LiveKit Agents:

pip install "livekit-agents[talkscriber]"

Usage Example

from livekit.agents import VoiceAssistant
from livekit.plugins import talkscriber

# Create STT instance
stt = talkscriber.STT(
    language="en",
    interim_results=True,
    enable_turn_detection=True,
)

# Create TTS instance
tts = talkscriber.TTS(
    voice="alloy",
    speed=1.0,
    pitch=0.0,
)

# Use in your agent
assistant = VoiceAssistant(
    stt=stt,
    tts=tts,
    # ... other configuration
)

Technical Details

Dependencies

  • livekit-agents[codecs]>=1.2.14
  • numpy>=1.26
  • aiohttp
  • websockets
  • loguru

Architecture

  • WebSocket-based real-time communication for low latency
  • REST API fallback for chunked synthesis
  • Proper error handling and reconnection logic
  • Efficient audio buffer management
  • Type-safe implementation with modern Python type hints

Testing

  • ✅ Linter errors fixed (type annotations, bare except clauses, etc.)
  • ✅ Environment variable configuration tested
  • ✅ Follows LiveKit plugin architecture and conventions

Files Changed

  • New plugin: livekit-plugins/livekit-plugins-talkscriber/
    • livekit/plugins/talkscriber/stt.py (629 lines)
    • livekit/plugins/talkscriber/tts.py (657 lines)
    • livekit/plugins/talkscriber/__init__.py
    • livekit/plugins/talkscriber/log.py
    • livekit/plugins/talkscriber/version.py
    • pyproject.toml
    • README.md
    • CHANGELOG.md
  • Updated: pyproject.toml (added plugin to workspace)
  • Updated: livekit-agents/pyproject.toml (added optional dependency)

Breaking Changes

None - This is a new plugin addition.

Related Links

Checklist

  • Code follows LiveKit plugin conventions
  • Documentation (README) included
  • Type annotations added
  • Linter errors resolved
  • Environment variable support for flexible deployment
  • Error handling and logging implemented
  • Compatible with Python 3.9+

This plugin expands LiveKit's voice AI capabilities by adding Talkscriber as a supported provider for both STT and TTS, giving developers more options for building real-time voice applications.

@CLAassistant
Copy link

CLAassistant commented Oct 25, 2025

CLA assistant check
All committers have signed the CLA.

@robosina robosina force-pushed the talkscriber-integration branch from 755343a to 8fece95 Compare October 28, 2025 20:22
- Add Talkscriber Speech-to-Text (STT) and Text-to-Speech (TTS) plugins for LiveKit Agents
- Implement WebSocket-based streaming support for both STT and TTS
- Add configurable environment variables for flexible deployment (host, port, SSL)
- Include comprehensive documentation and examples in README
- Update project dependencies to version 1.2.15
- Add initial changelog documenting plugin features

This integration enables real-time speech recognition and synthesis capabilities
using Talkscriber's API services within LiveKit agent applications.
@robosina robosina force-pushed the talkscriber-integration branch from 8fece95 to f93f6e2 Compare October 28, 2025 20:41
@robosina robosina marked this pull request as ready for review October 28, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants