Generates audio narration from a text file using Chatterbox TTS. Use when the user wants to generate voiceover/audio from ANY text file.
Generates voiceover audio from a text file using Chatterbox TTS with voice cloning. Outputs MP3 format directly. Supports automatic deployment and git push!
[Content]
β
create-script skill (REQUIRED FOR QUALITY)
- Condenses content ~50%
- Adds paralinguistic tags ([chuckle], [sigh], etc.)
- Rewrites for conversational speech
β
[filename].txt
β
voiceover skill (YOU ARE HERE)
- TTS generation with Chatterbox
- Deploy to site
- Git push
β
[filename].mp3 published
IMPORTANT: For high-quality voiceovers, ALWAYS use the create-script skill first. The --transform flag only does basic markdown strippingβno condensation, no paralinguistic tags.
USE THIS SKILL when the user:
.txt script file ready (created by create-script skill)IMPORTANT: If the user provides raw content (markdown, URL, article), use the create-script skill FIRST to prepare it, THEN use this skill on the resulting .txt file.
Chatterbox Directory: ~/projects/chatterbox (configure to your setup)
~/projects/chatterbox/archive/~/projects/chatterbox/archive/~/projects/chatterbox/clone.wav~/projects/chatterbox/voiceover.log| Argument | Default | Description |
|---|---|---|
-i, --input |
article.txt |
Input text file (use .txt from create-script) |
-o, --output |
<input>.mp3 |
Output MP3 file (auto-generated if omitted) |
-v, --voice |
clone.wav |
Voice reference for cloning |
-e, --entry |
none | Journal entry name (e.g., entry-011) for frontmatter update |
--deploy |
off | Copy MP3 to site public/audio/ after generation |
--push |
off | Git add, commit, and push to remote (implies --deploy) |
-m, --message |
auto | Custom git commit message |
--preflight |
off | Run pre-flight checks only (no generation) |
Ensure the input .txt file exists in the archive/ directory:
ls ~/projects/chatterbox/archive/entry-XXX.txt
If the user provides raw markdown or content, STOP and use create-script first.
CRITICAL: Use uv run from the chatterbox root directory.
cd ~/projects/chatterbox && nohup uv run python archive/voiceover_script.py \
-i archive/entry-XXX.txt \
-o archive/entry-XXX.mp3 \
--entry entry-XXX \
--push > voiceover.log 2>&1 &
Wait briefly and check the log once:
sleep 5 && head -10 ~/projects/chatterbox/voiceover.log
Expected output:
Using device: cuda
Loading model...
Fetching 10 files: 100%|ββββββββββ| 10/10 [00:00<?, ?it/s]
CRITICAL: DO NOT poll for progress repeatedly. This floods the context window. Trust the script to complete.
Tell the user:
archive/entry-XXX.txtarchive/entry-XXX.mp3tail -f ~/projects/chatterbox/voiceover.logThen you are DONE with this task. Do not wait for completion or check progress again.
When --push is used, the script automatically:
your-site/public/audio/audioUrlgit pull to syncYou don't need to monitor any of this. The script is self-contained.
cd ~/projects/chatterbox && nohup uv run python archive/voiceover_script.py \
-i archive/entry-013.txt \
-o archive/entry-013.mp3 \
--entry entry-013 \
--push > voiceover.log 2>&1 &
Then verify started:
sleep 5 && head -10 voiceover.log
Done. Move on.
cd ~/projects/chatterbox && nohup uv run python archive/voiceover_script.py \
-i archive/entry-010.txt \
-o archive/entry-010.mp3 \
--deploy > voiceover.log 2>&1 &
cd ~/projects/chatterbox && nohup uv run python archive/voiceover_script.py \
-i archive/my_script.txt \
-o archive/final_audio.mp3 > voiceover.log 2>&1 &
cd ~/projects/chatterbox && uv run python archive/voiceover_script.py --preflight
The script produces an MP3 file with:
The script sends notifications via notify-send:
| Error | Solution |
|---|---|
ModuleNotFoundError: No module named 'chatterbox' |
Check pyproject.toml package configuration |
No such file or directory |
Verify input file path and existence |
CUDA out of memory |
Reduce chunk size or run on CPU (slower) |
pydub.exceptions.CouldntEncodeError |
Install ffmpeg: sudo apt install ffmpeg |
| Git push fails | Check for uncommitted changes or network issues |
# Launch voiceover with push
cd ~/projects/chatterbox && nohup uv run python archive/voiceover_script.py \
-i archive/entry-XXX.txt \
-o archive/entry-XXX.mp3 \
--entry entry-XXX \
--push > voiceover.log 2>&1 &
# Verify started (ONE CHECK ONLY)
sleep 5 && head -10 voiceover.log
# DONE - do not poll for progress