Quick start and overview
A unified speech library for all your projects with support for multiple TTS providers and clean configuration structure.
~/.config/speakeasy/settings.json
npm install @arach/speakeasy
import { say } from '@arach/speakeasy';
await say('Hello world!'); // system voice
await say('Hello!', 'openai'); // OpenAI TTS
await say('Hello!', 'elevenlabs'); // ElevenLabs TTS
await say('Hello!', 'groq'); // Groq TTS
Caching makes a dramatic difference:
Provider | Without Cache | With Cache | Speedup |
---|---|---|---|
OpenAI | ~800ms | ~50ms | 16x faster |
ElevenLabs | ~1200ms | ~50ms | 24x faster |
Groq | ~400ms | ~50ms | 8x faster |
~/.config/speakeasy/settings.json
--doctor
and --diagnose
commands--debug
say()
and speak()
for quick usageSpeakEasy
class for advanced controlCommand | Description | Example |
---|---|---|
speakeasy "text" | Basic speech | speakeasy "Hello world" |
--provider <name> | Choose provider | --provider openai |
--voice <voice> | Select voice | --voice nova |
--rate <wpm> | Set speech rate | --rate 200 |
--volume <0-1> | Set volume | --volume 0.8 |
--cache | Enable caching | --cache |
--list | List cache entries | --list |
--stats | Cache statistics | --stats |
--doctor | Health check | --doctor |
// Quick functions
await say('Hello world'); // System voice
await say('Hello world', 'openai'); // Specific provider
// Class usage
const speaker = new SpeakEasy({
provider: 'openai',
openaiVoice: 'nova',
rate: 180,
cache: { enabled: true }
});
await speaker.speak('Hello world');
Location: ~/.config/speakeasy/settings.json
{
"providers": {
"openai": { "enabled": true, "voice": "nova", "apiKey": "sk-..." },
"elevenlabs": { "enabled": true, "voiceId": "...", "apiKey": "..." },
"system": { "enabled": true, "voice": "Samantha" },
"groq": { "enabled": true, "voice": "nova", "apiKey": "gsk_..." }
},
"defaults": {
"provider": "system",
"fallbackOrder": ["system", "openai", "elevenlabs"],
"rate": 180,
"volume": 0.7
},
"cache": {
"enabled": true,
"ttl": "7d",
"maxSize": "100mb"
}
}
export OPENAI_API_KEY="sk-..."
export ELEVENLABS_API_KEY="..."
export GROQ_API_KEY="gsk_..."
# Build completion
speakeasy "Build completed successfully" --provider system
# Error alerts
speakeasy "Build failed with errors" --provider openai --voice nova
import { say } from '@arach/speakeasy';
export async function speakNotification(message: string, project: string) {
await say(`In ${project}, ${message}`, 'openai');
}
const speaker = new SpeakEasy({
provider: 'elevenlabs',
volume: 0.8,
cache: { enabled: true }
});
await speaker.speak('Screen reader text', { priority: 'high' });
# API key missing
export OPENAI_API_KEY="your-key-here"
# Cache not working
speakeasy "test" --cache --provider openai
# System voice not working (non-macOS)
speakeasy "test" --provider openai
# Network issues
speakeasy "fallback" --provider system
# Configuration errors
speakeasy --doctor
--stats
See the main README for contribution guidelines.
MIT License - see LICENSE for details.
Need help? Start with the Troubleshooting Guide or run speakeasy --doctor
for diagnostics.