Loading...
Loading...
Generate Chinese broadcast audio from text files via the MiniMax TTS API, which automatically handles common pronunciation errors such as polyphonic characters, English abbreviations, mixed model names, and number pronunciations. Triggered when the user says "Generate broadcast audio using MiniMax".
npx skill4agent add yangagent/minimax-tts-pipeline-skill minimax-tts-pipeline| Parameter | Required | Description |
|---|---|---|
| Text file path | Yes | Absolute path of the .txt file to be processed |
| Output directory | No | By default, creates a |
<SKILL_DIR>/references/manage-user-rules.md<SKILL_DIR>/references/pronunciation-rules.md<SKILL_DIR>/user-rules.jsoninput.txt → input.raw.txt → [Script] normalize_punctuation.py → input.txt
→ [Script] scan_terms.py → terms.json(draft)
→ [Subagent 1] Complete normalization → terms.json
→ [Script] validate + generate_normalized.py → normalized.txt
→ [Subagent 2] Complete pronunciation + polyphonic character recognition → terms.json
→ [Script] validate
→ [Subagent 3] Review → terms.json(review.pass)
→ [Script] validate + call_tts.py → output.wav + output.title
→ [Script] title_to_srt.py → output.srt<SKILL_DIR><run_dir>tts-{YYYYMMDD-HHMMSS}/python3 --versionpython3 -c "import requests"requestspip3 install requestspip install requests<SKILL_DIR>/.env.env.env.envMINIMAX_API_KEYMINIMAX_API_KEY=<value provided by user><SKILL_DIR>/.env<input_dir>/tts-{YYYYMMDD-HHMMSS}/<input_dir><run_dir>/input.raw.txtpython3 <SKILL_DIR>/scripts/normalize_punctuation.py <run_dir>/input.raw.txt <run_dir>/input.txtpython3 <SKILL_DIR>/scripts/scan_terms.py <run_dir>/input.txt <run_dir>/terms.json<SKILL_DIR><run_dir>Please read the following files first, then perform the task.
## Required Files (Read in Order)
1. Operation Guide: <SKILL_DIR>/references/step-1-normalize.md
2. Pronunciation Rule Reference: <SKILL_DIR>/references/pronunciation-rules.md
3. User-defined Rules: <SKILL_DIR>/user-rules.json (skip if the file does not exist)
4. Original Text: <run_dir>/input.txt
5. Candidate Terms: <run_dir>/terms.json
## Task
Process the normalized, category, and reason fields of each term in terms.json according to the rules in the operation guide.
## Output
Directly modify and save <run_dir>/terms.json (do not create a new file).
## Validation
After modification, execute `python3 <SKILL_DIR>/scripts/validate_terms.py <run_dir>/terms.json 1`. If validation fails, correct terms.json according to the errors list and re-validate until it passes.
## Follow-up
After validation passes, execute `python3 <SKILL_DIR>/scripts/generate_normalized.py <run_dir>/input.txt <run_dir>/terms.json <run_dir>/normalized.txt`.<SKILL_DIR><run_dir>Please read the following files first, then perform the task.
## Required Files (Read in Order)
1. Operation Guide: <SKILL_DIR>/references/step-2-reading.md
2. Pronunciation Rule Reference: <SKILL_DIR>/references/pronunciation-rules.md
3. User-defined Rules: <SKILL_DIR>/user-rules.json (skip if the file does not exist)
4. Original Text: <run_dir>/input.txt
5. Normalized Text: <run_dir>/normalized.txt
6. Candidate Terms: <run_dir>/terms.json
## Task
Process the reading and category fields of each term in terms.json according to the rules in the operation guide, and identify missing polyphonic characters in the original text.
## Output
Directly modify and save <run_dir>/terms.json (do not create a new file).
## Validation
After modification, execute `python3 <SKILL_DIR>/scripts/validate_terms.py <run_dir>/terms.json 2`. If validation fails, correct terms.json according to the errors list and re-validate until it passes.<SKILL_DIR><run_dir>Please read the following files first, then perform the task.
## Required Files (Read in Order)
1. Operation Guide: <SKILL_DIR>/references/step-3-review.md
2. Pronunciation Rule Reference: <SKILL_DIR>/references/pronunciation-rules.md
3. User-defined Rules: <SKILL_DIR>/user-rules.json (skip if the file does not exist)
4. Original Text: <run_dir>/input.txt
5. Normalized Text: <run_dir>/normalized.txt
6. Complete Candidate Terms: <run_dir>/terms.json
## Task
Perform a final quality review on terms.json according to the check items in the operation guide.
## Output
Directly modify and save <run_dir>/terms.json (do not create a new file).
## Validation
After modification, execute `python3 <SKILL_DIR>/scripts/validate_terms.py <run_dir>/terms.json 3`. If validation fails, correct terms.json according to the errors list and re-validate until it passes.python3 <SKILL_DIR>/scripts/call_tts.py <run_dir>/normalized.txt <run_dir>/terms.json <run_dir>/output.wav <run_dir>/output.title<run_dir>/output.wav<run_dir>/output.titlepython3 <SKILL_DIR>/scripts/title_to_srt.py <run_dir>/output.title <run_dir>/output.wav <run_dir>/output.srttts-YYYYMMDD-HHMMSS/
input.raw.txt # Original input (read-only)
input.txt # Input after punctuation normalization (read-only)
terms.json # The only structured working file throughout the process
normalized.txt # Normalized text
output.wav # MiniMax TTS output audio
output.title # Word-level timestamp subtitle JSON returned by MiniMax
output.srt # SRT subtitles generated from output.title + output.wav<SKILL_DIR>/.envnormalize_punctuation.py <input> <output>scan_terms.pyvalidate_terms.py <terms_json> <stage>generate_normalized.py <input> <terms> <output>call_tts.py <normalized> <terms> <output_wav> [output_title]title_to_srt.py <input_title> <input_wav> [output_srt]pronunciation-rules.mdmanage-user-rules.mdapi-voice-settings.mdstep-1-normalize.mdstep-2-reading.mdstep-3-review.mduser-rules.json.envvoice_idspeedvolpitch<SKILL_DIR>/references/api-voice-settings.md<SKILL_DIR>/scripts/call_tts.py