Convert text to natural-sounding speech from your nself backend. Supports ElevenLabs for high-quality cloud voices, or Piper for fully local, offline voice synthesis with no API key and no cost per character.
nself-voice is part of the ɳClaw bundle. Set your key with nself license set nself_pro_... before installing.
nself license set nself_pro_...
nself plugin install voice
nself build
nself start| Variable | Required | Description |
|---|---|---|
PLUGIN_VOICE_PROVIDER | Yes | Voice provider: elevenlabs or piper |
PLUGIN_ELEVENLABS_API_KEY | ElevenLabs only | ElevenLabs API key. Not needed when using Piper. |
PLUGIN_PIPER_MODEL_PATH | Piper only | Path to Piper ONNX model file. Default: /models/piper-en-us.onnx |
PLUGIN_VOICE_PROVIDER=elevenlabs
PLUGIN_ELEVENLABS_API_KEY=sk_xxxxxPiper runs entirely on your server, no internet required, no per-character cost:
PLUGIN_VOICE_PROVIDER=piper
PLUGIN_PIPER_MODEL_PATH=/models/piper-en-us.onnx
# Download a model: https://github.com/rhasspy/piper/releases# Returns audio/mpeg binary
curl -X POST http://127.0.0.1:3714/voice/synthesize \
-H "Content-Type: application/json" \
-d '{
"text": "Welcome to nself. Your backend is ready.",
"voice": "Rachel",
"speed": 1.0
}' --output speech.mp3async function speak(text: string) {
const res = await fetch('/voice/synthesize', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ text, speed: 1.0 }),
})
const blob = await res.blob()
const url = URL.createObjectURL(blob)
const audio = new Audio(url)
audio.play()
}| Endpoint | Method | Description |
|---|---|---|
/voice/synthesize | POST | Convert text to speech. Returns audio/mpeg binary. |
/voice/voices | GET | List available voices (ElevenLabs only, includes custom cloned voices) |
/health | GET | Check plugin health and provider status |
{
"text": "string", // text to synthesize (max 5000 chars)
"voice": "Rachel", // voice name or ID (ElevenLabs only)
"speed": 1.0, // playback speed: 0.5–2.0 (default: 1.0)
"format": "mp3" // output format: mp3 | wav (default: mp3)
}| Feature | ElevenLabs | Piper |
|---|---|---|
| Voice quality | Excellent, natural, expressive | Good, clear, natural-sounding |
| Cost | Per-character API cost | Free, runs on your server |
| Internet required | Yes | No, fully offline |
| Custom voices | Yes, voice cloning available | No, pre-trained models only |
| Latency | ~300ms | ~50ms on modern hardware |
nself plugin remove voicePort: 3714 | Bundle: ɳClaw ($0.99/mo) or ɳSelf+ ($3.99/mo) | Last Updated: April 2026 | Plugin Version 1.0.12