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 |
Text Formatting
Newline characters in your input text affect prosody:
\n(single newline) creates a sentence-level breath pause\n\n(double newline) creates a paragraph-level pause with prosodic reset- No newlines in long text produces rushed, flat delivery
Best practice: Insert \n between sentences and \n\n between paragraphs. Avoid text with hard line wraps every 60-80 characters (e.g., from PDFs or terminals) — this produces choppy output.
See the Text Formatting Guide for details and preprocessing examples.
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
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
File details
Details for the file murmr-0.5.0.tar.gz.
File metadata
- Download URL: murmr-0.5.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c54be8aec2a24ef5949eec3552789e8b14ee3c7dc7bebd1e5c66a8955c7c5d8b
|
|
| MD5 |
974b6d6046525c685ffe05899449d631
|
|
| BLAKE2b-256 |
c967c938103e4a946498b151cb79ab74d02cce14c5144e4c7fedb0223fc39497
|
Provenance
The following attestation bundles were made for murmr-0.5.0.tar.gz:
Publisher:
publish.yml on murmr-tts/murmr-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
murmr-0.5.0.tar.gz -
Subject digest:
c54be8aec2a24ef5949eec3552789e8b14ee3c7dc7bebd1e5c66a8955c7c5d8b - Sigstore transparency entry: 1061825349
- Sigstore integration time:
-
Permalink:
murmr-tts/murmr-python@2cfb6d5e63cc86b5968a8d1c705de00e1c8019d7 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/murmr-tts
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2cfb6d5e63cc86b5968a8d1c705de00e1c8019d7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file murmr-0.5.0-py3-none-any.whl.
File metadata
- Download URL: murmr-0.5.0-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95b72edfb8c2bead543d60b49877b3451131937f81c692ee5821298b63d55287
|
|
| MD5 |
25da49dff933f5b8a62fbb21e08660a8
|
|
| BLAKE2b-256 |
e9fbd6fe9cec66f56ebd34e6ba707d48c770b1f5f267bb697e6173993998ba2d
|
Provenance
The following attestation bundles were made for murmr-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on murmr-tts/murmr-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
murmr-0.5.0-py3-none-any.whl -
Subject digest:
95b72edfb8c2bead543d60b49877b3451131937f81c692ee5821298b63d55287 - Sigstore transparency entry: 1061825350
- Sigstore integration time:
-
Permalink:
murmr-tts/murmr-python@2cfb6d5e63cc86b5968a8d1c705de00e1c8019d7 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/murmr-tts
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2cfb6d5e63cc86b5968a8d1c705de00e1c8019d7 -
Trigger Event:
release
-
Statement type: