Custom STT and TTS plugins for LiveKit Agents that run entirely locally without cloud APIs. Includes faster-whisper for speech-to-text and Piper for text-to-speech.
A skill for working with local STT/TTS plugins for LiveKit Agents that run entirely locally without cloud APIs.
This project provides custom Speech-to-Text (STT) and Text-to-Speech (TTS) plugins for LiveKit Agents that eliminate the need for cloud API dependencies by running entirely on local hardware.
**Repository:** `CoreWorxLab/local-livekit-plugins`
The project follows a clean separation between the installable package and demonstration code:
```
src/local_livekit_plugins/ # The installable Python package
├── faster_whisper_stt.py # STT plugin using faster-whisper (GPU-accelerated)
└── piper_tts.py # TTS plugin using Piper
examples/ # Demo code (not part of installed package)
├── voice_agent.py
└── .env.local.example
```
**CRITICAL:** Plugin imports must be at module level. LiveKit requires plugins to be registered on the main thread.
❌ **NEVER** import plugins inside functions:
```python
def setup():
from local_livekit_plugins import FasterWhisperSTT # WRONG
```
✅ **ALWAYS** import at module level:
```python
from local_livekit_plugins import FasterWhisperSTT # CORRECT
def setup():
# use the plugin here
```
```bash
uv sync
```
Create `.env.local` in the `examples/` directory by copying the example:
```bash
cp examples/.env.local.example examples/.env.local
```
```bash
uv run examples/voice_agent.py dev
uv run examples/voice_agent.py console
```
```bash
uv run ruff check src/
uv run mypy src/
uv run pytest
```
1. Create the plugin file in `src/local_livekit_plugins/`
2. Ensure imports are at module level (never inside functions)
3. Add appropriate type hints for mypy
4. Write tests in the `tests/` directory
5. Update documentation
1. Run linter: `uv run ruff check src/`
2. Run type checker: `uv run mypy src/`
3. Run tests: `uv run pytest`
4. Test with voice agent: `uv run examples/voice_agent.py dev`
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/local-livekit-plugins-development/raw