Tools
Javis Tts
Javis โ a local TTS notification plugin for OpenClaw. Speaks ambient alerts, briefings, and research updates to your PC.
Install
pip install melotts
README
# ๐๏ธ Javis โ Local TTS Plugin for OpenClaw
> A privacy-first, ambient voice assistant that speaks notifications, briefings, and research results directly to your PC.
[](https://openclaw.ai)
[](LICENSE)
## What is Javis?
Javis is an OpenClaw plugin that continuously talks to you on your local PC using high-quality text-to-speech. Unlike cloud TTS services, Javis runs entirely locally โ your data never leaves your machine.
**Core use cases:**
- ๐
**Morning Briefing** โ Wake up to a summary of your calendar, weather, and overnight GitHub activity
- ๐ **GitHub Live Changelog** โ Get notified when PRs are merged or issues are filed in your repos
- ๐ก **Research Loop Speaker** โ Javis narrates findings during long research sessions, like pair programming
- ๐ง **Memory Pulse** โ When memory mining completes, Javis reads the highlights aloud
- ๐จ **Priority Alerts** โ Critical system alerts spoken immediately regardless of what you're doing
## Tech Stack
| Layer | Technology | Why |
|---|---|---|
| **TTS Engine (default)** | [MeloTTS](https://github.com/myshell-ai/MeloTTS) | CPU real-time, MIT licensed, <1s latency, multi-lingual |
| **TTS Engine (premium)** | [ElevenLabs](https://elevenlabs.io) (via `sag` skill) | World-class quality, 75ms streaming |
| **Fallback** | macOS `say` / Piper TTS | Zero-dependency, ONNX-based |
| **Audio Playback** | `afplay` (macOS) / `paplay` (Linux) | Native, no extra deps |
| **Trigger Platform** | OpenClaw (cron, hooks, agents) | Already running locally |
## Architecture
```
OpenClaw (cron/agent events)
โ
โผ
Javis TTS Service (Python)
โโโ melo_tts.py # MeloTTS engine wrapper
โโโ piper_tts.py # Piper TTS (optional, ONNX)
โโโ elevenlabs.py # ElevenLabs via sag skill
โโโ audio_player.py # Cross-platform playback
โ
โผ
Speaker / Headphones ๐ง
```
## TTS Engine Comparison
| Engine | Latency | Quality | Cost | Privacy | Setup |
|---|---|---|---|---|---|
| **MeloTTS** | <1s (CPU RT) | Good | Free (MIT) | โ
100% local | `pip install` |
| **Piper TTS** | <1s (ONNX) | Good | Free (Apache 2.0) | โ
100% local | Medium |
| **ElevenLabs** | 75ms streaming | Excellent | $$$ | โ Cloud | Trivial (API key) |
| **macOS `say`** | <0.1s | PoorโOkay | Free | โ
100% local | None (built-in) |
> **Decision:** Use MeloTTS as the default ambient engine. ElevenLabs as an optional premium upgrade. macOS `say` as the zero-dependency fallback.
## Quick Start
### 1. Install MeloTTS
```bash
pip install melotts
```
### 2. Clone the plugin
```bash
git clone https://github.com/fuleinist/javis-tts-plugin.git
cd javis-tts-plugin
```
### 3. Test it
```bash
python3 -c "
from melo_tts import JavisTTS
tts = JavisTTS()
tts.speak('Javis is online. Your morning briefing is ready.')
"
```
### 4. Wire into OpenClaw
Add to your OpenClaw cron or agent to trigger on events:
```bash
# Example: OpenClaw cron hook โ morning briefing
0 6 * * * python3 /path/to/javis-tts-plugin/melo_tts.py "Good morning! You have 3 meetings today."
```
## Project Structure
```
javis-tts-plugin/
โโโ README.md # This file
โโโ IMPLEMENTATION.md # Detailed implementation plan
โโโ melo_tts/
โ โโโ melo_tts.py # Core MeloTTS service
โ โโโ requirements.txt
โโโ piper_tts/
โ โโโ piper_tts.py # Piper TTS service
โ โโโ requirements.txt
โโโ elevenlabs_tts/
โ โโโ elevenlabs_tts.py # ElevenLabs via sag
โโโ openclaw_integration/
โ โโโ cron_examples.sh # Example cron triggers
โ โโโ openclaw_hook.py # Python hook for OpenClaw agents
โโโ examples/
โโโ morning_briefing.py
โโโ github_notifier.py
โโโ research_loop_speaker.py
```
## Key Patterns
### Streaming Audio (don't wait for full generation)
For ambient notifications, the critical pattern is **stream and play concurrently** โ start audio playback as soon as the first chunk arrives, don't wait for full generation.
```python
# Conceptual pattern โ generate and play concurrently
import threading
def speak_async(text):
thread = threading.Thread(target=generate_and_play, args=(text,))
thread.start()
def generate_and_play(text):
# Generate audio
audio = melo_tts.tts(text)
# Play immediately when ready
audio_player.play(audio)
```
### Audio Ducking
When your user is listening to music, Javis should lower the volume while speaking:
```bash
# macOS: lower music volume while speaking, then restore
osascript -e 'set volume output volume 30'
say "Stand-up meeting in 5 minutes"
osascript -e 'set volume output volume 70'
```
## Relevant Repos
| Repo | Purpose | Stars |
|---|---|---|
| [myshell-ai/MeloTTS](https://github.com/myshell-ai/MeloTTS) | Primary recommended engine | 6k+ |
| [rhasspy/piper](https://github.com/rhasspy/piper) | ONNX TTS (battle-tested) | 9k+ |
| [coqui-ai/TTS](https://github.com/coqui-ai/TTS) | Full TTS library (VITS, XTTS) | 32k+ |
| [KoljaB/RealtimeTTS](https://github.com/KoljaB/RealtimeTTS) | Streaming TTS with callbacks | 1k+ |
| [jitendraparande/piper-streaming](https://github.com/jitendraparande/piper-streaming) | Node HTTP streaming for Piper | |
## License
MIT โ free for personal and commercial use.
tools
Comments
Sign in to leave a comment