Get started in 5 minutes
Get up and running with SpeakEasy in under 5 minutes.
node:sqlite for cache) or Bun >= 1.0 (bun:sqlite)say / afplay)# npm
npm install @arach/speakeasy
# pnpm
pnpm add @arach/speakeasy
# global CLI
npm install -g @arach/speakeasy
import { say, SpeakEasy } from '@arach/speakeasy';
// One-liner — uses system voice on macOS
await say('Hello, world!');
// With a cloud provider (requires API key)
await say('Hello from OpenAI', 'openai');
// Full configuration with caching
const speaker = new SpeakEasy({
provider: 'openai',
openaiVoice: 'nova',
rate: 180,
cache: { enabled: true },
apiKeys: { openai: process.env.OPENAI_API_KEY },
});
await speaker.speak('Hello, world!');
# System voice (no API key)
speakeasy "Hello, world!" --provider system
# OpenAI with caching
speakeasy "Build completed" --provider openai --voice nova --cache
# Health check
speakeasy --doctor
export OPENAI_API_KEY="sk-..."
export ELEVENLABS_API_KEY="..."
export GROQ_API_KEY="gsk_..."
export GEMINI_API_KEY="AIza..."
Or configure once in ~/.config/speakeasy/settings.json — see Configuration.
Caching is automatic for API providers when keys are present. Inspect it from the CLI:
speakeasy --stats
speakeasy --list
speakeasy --find "hello"
From the SDK:
const stats = await speaker.getCacheStats();
const entries = await speaker.findByText('hello');