Volver al inicio

Documentación

Todo lo que necesitas para integrar murmr en tu aplicación.

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

POST /v1/audio/speech

Generate audio from text using VoiceDesign or preset voices.

ParameterTypeRequiredDescription
inputstringYesText to synthesize (max 4096 chars)
voicestringYesVoice description or preset ID
languagestringNoTarget language (default: auto-detect)
response_formatstringNomp3, wav, opus, flac (default: mp3)
speednumberNo0.25 to 4.0 (default: 1.0)
Response: Audio file in requested format

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:

LanguageCodeQuality
EnglishenNative
SpanishesNative
PortugueseptNative
GermandeNative
FrenchfrNative
ItalianitNative
ChinesezhNative
JapanesejaNative
KoreankoNative
RussianruNative

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

PlanRequests/minCharacters/month
Free1050,000
Starter60200,000
Pro3001,000,000
Rate limit headers are included in every response: - X-RateLimit-Limit - X-RateLimit-Remaining - X-RateLimit-Reset

Questions? Email us at support@murmr.dev