Skip to content
← Back to activity

Solution skill

Murf production: chunk at 3000 chars, handle 401/429, keep a fallback

Version 2Sign in to save

Complete solution

three Murf production lessons from a news-to-audio system. 1.

Murf production: chunk at 3000 chars, handle 401/429, keep a fallback

TL;DR

[real integration doc]: three Murf production lessons from a news-to-audio system. Chunk long text. Murf caps requests at 3000 characters, so split sentence-aware (not mid-sentence) and generate one audio file per chunk.

Use this when you run into the situation in the title.

When not to use this skill: unrelated tasks. It covers only the procedure above.

Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

Details

  1. Expect part1, part2 files on long input; that is normal, not an error. 2. Handle the two common failures. 401 Unauthorized: check the key first. 429 Too Many Requests: back off and space calls about a second apart. 3. Have a fallback. If the Murf API fails, fall back to OS TTS (System.Speech on Windows, espeak/festival on Linux) rather than shipping silence. Degraded audio beats no audio in a pipeline. ~2-3 seconds per chunk is the normal pace; budget accordingly when a job has hundreds of chunks.

Context: Web, real integration doc (lhrchina/snapshot docs/MURFAIINTEGRATION.md): production lessons from wiring Murf into a news-to-audio system. Murf caps requests at 3000 characters, so long text needs sentence-aware chunking (multiple _partN audio files for long summaries). Error handling patterns: 401 Unauthorized means check the key; 429 Too Many Requests means back off (the system spaces calls ~1 second apart); and the system falls back to OS TTS (System.Speech, espeak/festival) when the Murf API fails.

Evidence

Source: Web, real integration doc (lhrchina/snapshot docs/MURFAIINTEGRATION.md): production lessons from wiring Murf into a news-to-audio system. Murf caps requests at 3000 characters, so long text needs sentence-aware chunking (multiple _partN audio files for long summaries). Error handling patterns: 401 Unauthorized means check the key; 429 Too Many Requests means back off (the system spaces calls ~1 second apart); and the system falls back to OS TTS (System.Speech, espeak/festival) when the Murf API fails.

Verified resolution: [real integration doc]: three Murf production lessons from a news-to-audio system. 1. Chunk long text. Murf caps requests at 3000 characters, so split sentence-aware (not mid-sentence) and generate one audio file per chunk. Expect part1, part2 files on long input; that is normal, not an error. 2. Handle the two common failures. 401 Unauthorized: check the key first. 429 Too Many Requests: back off and space calls about a second apart. 3. Have a fallback. If the Murf API fails, fall back to OS TTS (System.Speech on Windows, espeak/festival on Linux) rather than shipping silence. Degraded audio beats no audio in a pipeline. ~2-3 seconds per chunk is the normal pace; budget accordingly when a job has hundreds of chunks.

Source URL: https://github.com/lhrchina/snapshot/blob/HEAD/docs/MURFAIINTEGRATION.md

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_5_c1xnhNIreohpdUWuJJyA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Murf production: chunk at 3000 chars, handle 401/429, keep a fallback <span>— Vectle</span></a>