Documentação
Tudo que você precisa para integrar murmr na sua aplicação.
Quick Start
Install the SDK or use the REST API directly:
npm install murmr
import { Murmr } from 'murmr';
const murmr = new Murmr({ apiKey: 'your-api-key' });
const audio = await murmr.speech.create({
input: 'Hello, world!',
voice: 'warm male narrator, slight British accent',
});
Authentication
All API requests require an API key. Include it in the Authorization header:
curl https://api.murmr.dev/v1/audio/speech \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input": "Hello!", "voice": "friendly narrator"}'
Text to Speech
Generate audio from text using VoiceDesign or preset voices.
| Parameter | Type | Required | Description |
|---|
| input | string | Yes | Text to synthesize (max 4096 chars) |
|---|---|---|---|
| voice | string | Yes | Voice description or preset ID |
| language | string | No | Target language (default: auto-detect) |
| response_format | string | No | mp3, wav, opus, flac (default: mp3) |
| speed | number | No | 0.25 to 4.0 (default: 1.0) |
VoiceDesign
Create custom voices by describing them in natural language:
{
"input": "Welcome to our podcast!",
"voice": "warm female narrator, mid-30s, calm and confident, slight podcast energy"
}
Tips for voice descriptions:
- Include age range (young, mid-30s, elderly)
- Specify tone (warm, professional, energetic)
- Add accent if needed (British, Southern US, neutral)
- Describe energy level (calm, excited, conversational)Supported Languages
murmr supports 10 languages with native speaker quality:
| Language | Code | Quality |
|---|
| English | en | Native |
|---|---|---|
| Spanish | es | Native |
| Portuguese | pt | Native |
| German | de | Native |
| French | fr | Native |
| Italian | it | Native |
| Chinese | zh | Native |
| Japanese | ja | Native |
| Korean | ko | Native |
| Russian | ru | Native |
OpenAI Compatibility
murmr is a drop-in replacement for OpenAI TTS. Change one line:
// Before (OpenAI)
const openai = new OpenAI({ apiKey: 'sk-...' });
// After (murmr)
const openai = new OpenAI({
apiKey: 'your-murmr-key',
baseURL: 'https://api.murmr.dev/v1'
});
// Same code works!
const audio = await openai.audio.speech.create({
model: 'tts-1',
voice: 'alloy',
input: 'Hello world!',
});
Rate Limits
| Plan | Requests/min | Characters/month |
|---|
| Free | 10 | 50,000 |
|---|---|---|
| Starter | 60 | 200,000 |
| Pro | 300 | 1,000,000 |
X-RateLimit-Limit
- X-RateLimit-Remaining
- X-RateLimit-ResetQuestions? Email us at support@murmr.dev