Python SDK for the murmr TTS API
Project description
murmr
Python SDK for the murmr TTS API. Async-first with full sync support.
pip install murmr
Quick Start
Voice Design (describe any voice in natural language)
from murmr import MurmrClient
client = MurmrClient(api_key="murmr_sk_live_...")
# Generate speech with a voice description
wav = client.voices.design(
input="Hello, welcome to murmr!",
voice_description="A warm, friendly female voice with a slight British accent",
)
with open("output.wav", "wb") as f:
f.write(wav)
Saved Voices (batch via RunPod Serverless)
# Submit a batch job
job = client.speech.create(input="Hello world", voice="voice_abc123")
# Wait for completion
result = client.speech.create_and_wait(input="Hello world", voice="voice_abc123")
audio = result.audio_bytes # decoded WAV
Streaming
# Stream PCM audio chunks
with client.speech.stream(input="Hello world", voice="voice_abc123") as stream:
for chunk in stream:
pcm = chunk.audio_bytes # 24kHz mono 16-bit PCM
if chunk.done:
break
Async
import asyncio
from murmr import AsyncMurmrClient
async def main():
async with AsyncMurmrClient(api_key="murmr_sk_live_...") as client:
wav = await client.voices.design(
input="Hello from async!",
voice_description="A deep male voice",
)
asyncio.run(main())
Long-Form Audio
# Automatically chunks, retries, and concatenates
result = client.speech.create_long_form(
input=very_long_text,
voice="voice_abc123",
on_progress=lambda current, total, pct: print(f"{pct}%"),
)
with open("long_form.wav", "wb") as f:
f.write(result.audio)
API Reference
Clients
| Class | Description |
|---|---|
MurmrClient(api_key=...) |
Sync client (context manager) |
AsyncMurmrClient(api_key=...) |
Async client (async context manager) |
Speech (client.speech)
| Method | Returns | Description |
|---|---|---|
create(input, voice, ...) |
AsyncJobResponse |
Submit batch job |
create_and_wait(input, voice, ...) |
JobStatus |
Submit and poll until done |
stream(input, voice, ...) |
Context manager yielding AudioStreamChunk |
Stream PCM chunks |
create_long_form(input, voice, ...) |
LongFormResult |
Chunk + concat long text |
Voices (client.voices)
| Method | Returns | Description |
|---|---|---|
design(input, voice_description, ...) |
bytes (WAV) |
Generate with voice description |
design_stream(input, voice_description, ...) |
Context manager yielding AudioStreamChunk |
Stream voice design |
Jobs (client.jobs)
| Method | Returns | Description |
|---|---|---|
get(job_id) |
JobStatus |
Get job status |
wait_for_completion(job_id, ...) |
JobStatus |
Poll until done/failed |
Supported Languages
Chinese, English, Japanese, Korean, German, French, Russian, Portuguese, Spanish, Italian
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
murmr-0.1.0.tar.gz
(18.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
murmr-0.1.0-py3-none-any.whl
(16.0 kB
view details)
File details
Details for the file murmr-0.1.0.tar.gz.
File metadata
- Download URL: murmr-0.1.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2dd90dbb677da845b65bd84e0fc0000c23fa3b6ce74ef6883a79df351578cfd
|
|
| MD5 |
48a38c93617cfd3fae25eb679116ea7a
|
|
| BLAKE2b-256 |
327f97aacc6ea2c51d4fd42e8d64cf8c4422eb1f6d58202b9d038645f8ce8656
|
File details
Details for the file murmr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: murmr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9806f59fdc23ce436f221c71bac23900216e28ff8d8d461373a6c70722b27e3b
|
|
| MD5 |
d28cc6fcd7f767baa57e843b90d691eb
|
|
| BLAKE2b-256 |
14bfae7b6e78f5433cf31b5e13be89ace791d3f339e8e5f4cfb2723f4ef9d7b1
|