audio-story-mcp
This MCP server automates the mechanical pipeline for turning a YouTube or local audio story into a rewritten, checked, Vietnamese TTS-rendered story.mp3.
Create a new run from a YouTube link or local audio/subtitle/transcript file, optionally skipping audio download.
Transcribe audio using captions, existing text, OpenAI, or local Whisper into timestamped transcript files.
Split long transcripts into chapters.
Check run status and list recent runs.
Validate rewritten story/cast/script files: detect original-name leaks, missing narrator voice, empty segments, high overlap, overly long segments, name collisions, and unknown voices; regenerate
script.mdfor review.List available VieNeu-TTS voices and preview a sentence with a chosen voice.
Render TTS segment audio with the narrator voice, resuming already-rendered segments and supporting retries/limits/workers.
QA rendered audio by transcribing it and computing CER to find segments needing re-recording.
Assemble rendered segments into
story.wav/story.mp3with pauses, chapter gaps, optional loudness normalization, and optional draft output.Run environment diagnostics for ffmpeg, yt-dlp, STT engines, VieNeu server, and runs directory.
Provides an optional transcription engine using OpenAI's gpt-4o-transcribe model via OPENAI_API_KEY for fast speech-to-text conversion of source audio.
Allows fetching a YouTube video as an audio-story source, including audio, metadata, and available Vietnamese captions, to start a story-processing run.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@audio-story-mcp Make an audio story from this YouTube link, rename all characters"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
audio-story-mcp
MCP server + plugin Claude Code: link YouTube truyện audio → chép lời → Claude đổi tên nhân vật, viết lại tình tiết →
đọc bằng một giọng thuyết minh tiếng Việt (VieNeu-TTS) → story.mp3.
Tool MCP không gọi LLM — Claude Code viết lại truyện; server tải, chép lời, kiểm (sót tên cũ, % trùng bản gốc),
đọc TTS và ghép. Plan: docs/plan.md · tiến độ: docs/status.md.
Cài
Cần: Claude Code · uv. ffmpeg và yt-dlp đi kèm gói Python, không cần cài hệ thống.
/plugin marketplace add https://github.com/cuonghv0298/audio-story-mcp.git
/plugin install audio-story@audio-storyGõ /mcp → plugin:audio-story:audio-story ✔ connected (lần đầu uv cài thư viện ~30 s).
VieNeu-TTS (giọng đọc, chạy trên máy, Apache-2.0): skill tự nhắc khởi động khi cần. Chạy tay:
scripts/vieneu.sh run # http://127.0.0.1:8165 — lần đầu cài ~1–2 phút + tải modelĐặt VIENEU_URL nếu chạy VieNeu ở máy khác (vd. máy có GPU).
Chép lời (STT) — một trong:
phụ đề tiếng Việt có sẵn trên video (tự dùng, miễn phí);
OPENAI_API_KEY(modelgpt-4o-transcribe, nhanh, tốn phí);whisper tại máy:
uv sync --extra whisper(miễn phí, chậm trên CPU; model đặt bằngAUDIO_STORY_WHISPER_MODEL).
Related MCP server: youtube-content
Dùng
Làm truyện audio mới từ https://www.youtube.com/watch?v=… — đổi hết tên nhân vật, viết lại tình tiếtSkill audio-story đi qua: fetch_source → transcribe → Claude viết story_bible.json, cast.json, script.json →
check_script → anh duyệt script.md + nghe thử giọng → tts_render → assemble_audio → out/story.mp3.
Mọi file nằm trong thư mục run ./audio-story-runs/<slug>-<ngày>-<id>/ (đổi gốc bằng AUDIO_STORY_RUNS_DIR).
Tool MCP
Tool | Làm gì |
| Link YouTube (audio + metadata + phụ đề vi) hoặc file audio/.vtt/.srt/.txt → run mới |
|
|
| Tách transcript dài theo «Chương N» → |
| Run đang ở bước nào |
| Kiểm |
| 25 giọng VieNeu, nghe thử một câu |
| Đọc từng đoạn (bỏ qua đoạn đã đọc → chạy tiếp được khi bị ngắt) |
| STT nghe lại từng đoạn, CER → đoạn cần đọc lại |
| Ghép + khoảng nghỉ + chương → |
| Kiểm ffmpeg, yt-dlp, STT, VieNeu |
CLI (không qua Claude — cho bước dài)
uv run audio-story doctor
uv run audio-story fetch <url|file>
uv run audio-story transcribe <run> --engine whisper
uv run audio-story chapters <run>
uv run audio-story check <run>
uv run audio-story render <run> [--limit 3]
uv run audio-story assemble <run>Phát triển
uv sync # + --extra whisper nếu cần
uv run pytest # không gọi mạng
uv run ruff check src tests
uv run python scripts/smoke_stdio.py # gọi server qua MCP stdio thậtMở Claude Code trong repo này là dùng được server luôn (.mcp.json ở gốc). Truyện mẫu: examples/demo/.
Available Tools
12 toolsassemble_audioA
Ghép các đoạn theo thứ tự kịch bản, chèn khoảng nghỉ pause_after_ms (+1,5 s giữa chương) → out/story.wav và out/story.mp3 (chuẩn hoá âm lượng -16 LUFS). allow_missing=true: ghép bản nháp dù còn đoạn chưa đọc.
Inputs: run (required), format, loudnorm, allow_missing. Returns: object
check_scriptA
Kiểm tất định story/cast.json + script/script.json → script/check.json, và dựng lại script/script.md để duyệt. Lỗi (chặn tts_render): schema, old_name_leak (còn tên gốc — so cả không dấu), voice_missing (chưa chọn giọng thuyết minh), empty_text. Cảnh báo: high_overlap (% cụm 6 từ trùng bản gốc > max_overlap), segment_too_long, new_name_collision, voice_unknown (khi server TTS đang chạy).
Inputs: run (required), max_overlap, max_segment_chars. Returns: object
doctorA
Kiểm môi trường: ffmpeg, yt-dlp, engine STT có sẵn, server VieNeu, thư mục run.
Inputs: no named parameters. Returns: object
fetch_sourceA
Tạo thư mục run mới từ link YouTube (tải audio + metadata + phụ đề tiếng Việt nếu có) hoặc từ file trên máy
(audio .mp3/.m4a/.wav…, phụ đề .vtt/.srt, hay transcript .txt/.md). Trả run_dir để dùng cho các tool sau.
with_audio=false: chỉ lấy metadata + phụ đề (nhanh, khi chắc chắn phụ đề đủ tốt).
Inputs: source (required), title, with_audio. Returns: object
list_runsB
Liệt kê các run gần nhất dưới thư mục gốc ($AUDIO_STORY_RUNS_DIR, mặc định ./audio-story-runs).
Inputs: limit. Returns: result
list_voicesA
Danh sách giọng của server VieNeu-TTS (id dùng làm narrator.voice trong cast.json) + tình trạng server.
Inputs: no named parameters. Returns: object
qa_audioB
Nghe lại các đoạn đã đọc bằng STT (openai | whisper), tính CER so với chữ đưa vào TTS → qa/report.json. Trả các đoạn CER > max_cer để sửa phát âm (pronunciation.json) rồi đọc lại.
Inputs: run (required), limit, engine, max_cer, +1 more. Returns: object
run_statusB
Trạng thái một run: nguồn, file đã có, lịch sử bước, bước kế tiếp nên làm.
Inputs: run (required). Returns: object
split_chaptersA
Tách transcript dài thành từng chương theo mốc «Chương <số>» → transcript/chapters/chuong-XXXX.txt (kèm số ký tự, mốc thời gian, ước lượng phút audio). Dùng khi truyện dài nhiều chương: đọc/viết lại từng chương thay vì cả file.
Inputs: run (required). Returns: object
transcribeA
Chuyển audio của run thành chữ → transcript/transcript.txt (bản đọc, có mốc thời gian) + transcript.json. engine: auto | captions (phụ đề YouTube) | text (file .txt có sẵn) | openai (cần OPENAI_API_KEY) | whisper (faster-whisper tại máy). Sau đó đọc transcript.txt bằng công cụ đọc file (có thể dài — đọc theo phần).
Inputs: run (required), engine, language. Returns: object
tts_previewA
Đọc thử một câu bằng một giọng → file WAV (áp pronunciation.json của run nếu có). Dùng để chọn giọng / thử cách đọc tên trước khi đọc cả truyện. Không có run thì ghi vào ./audio-story-runs/_preview/.
Inputs: text (required), voice (required), run, name. Returns: object
tts_renderA
Đọc kịch bản bằng VieNeu → audio/seg_XXXXX.wav, cả truyện một giọng thuyết minh (cast.narrator.voice). Chỉ chạy khi check_script mới nhất không còn lỗi. Đoạn đã đọc với cùng chữ + giọng thì bỏ qua → gọi lại để chạy tiếp. limit: chỉ đọc N đoạn (làm thử); segment_ids: đọc lại đúng các đoạn này; workers>1 khi server có GPU.
Inputs: run (required), force, limit, workers, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool maps to a distinct pipeline stage: setup (doctor), ingest (fetch_source), transcribe, split, inspect (run_status/list_runs), validate (check_script), preview/render TTS, QA, and assemble. The only near-neighbors—run_status vs list_runs and fetch_source vs transcribe—are clearly differentiated by scope (single run vs listing; source acquisition vs speech-to-text). No two tools appear to do the same thing.
The set is predominantly snake_case with verb_noun naming (list_voices, split_chapters, fetch_source, check_script, tts_preview, tts_render, qa_audio, assemble_audio). Minor deviations exist: bare verbs/nouns (doctor, transcribe) and a noun-first tool (run_status), but overall it reads consistently.
Twelve tools cleanly cover a multi-stage audio-story pipeline, with each tool earning its place as a discrete workflow step. The count is well-scoped—no redundant or filler tools and none obviously missing from the pipeline.
The surface covers the full lifecycle from ingest through transcription, chapter splitting, script validation, TTS rendering, QA, and final assembly, with a preview step for voice selection. Gaps are minor: there are no dedicated tools for building/editing cast.json, script.json, or pronunciation.json, and no run cleanup/deletion, though these can be handled via file editing.
Maintenance
Related MCP Connectors
Text to speech and transcription for any AI model: MP3 voiceovers, audio and YouTube to text.
Use VoiceCheap’s media tools from your AI agent: transcribe audio, video and YouTube; create, translate and add subtitles to videos; generate YouTube chapters; create speech, design voices or clone voices with permission; generate images and thumbnails; translate and dub videos with optional lip sync; and publish completed projects to your connected channels. Manage project status, transcripts, glossaries and workspace settings through the tools you authorize. Available tools depend on your OAuth permissions and account access. Generation uses existing credits; purchases take place on the VoiceCheap website.
Turn documents and photos into narrated AI videos from Claude, ChatGPT, Codex or any MCP client.
Your YouTube library, in the AI tools you already use: Claude, ChatGPT, Cursor, any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables YouTube integration with Claude Code, including video search, metadata retrieval, transcript fetching, channel exploration, and trending videos.81MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered YouTube content management using Claude Code to orchestrate research, scripting, and scheduling via Google Sheets, Docs, and Drive.-
- FlicenseNot gradedqualityCmaintenanceEnables transcription, search, and lesson generation from podcast and YouTube URLs directly inside Claude Code.2-
- FlicenseAqualityCmaintenanceEnables Claude Code to access YouTube features such as video transcripts, search, metadata, channel info, playlists, comments, trending videos, engagement analytics, chapters, SponsorBlock, and most-replayed heatmaps.1530 npm1-