cosyvoice-ssml

Converts approved digital-human voiceover scripts into CosyVoice SSML segments for TTS synthesis.

1.6k|214|Updated Jun 4, 2025
One-click install
npx skills add https://github.com/Jamailar/RedBox --skill cosyvoice-ssml
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cosyvoice-ssml
Source: https://github.com/Jamailar/RedBox/tree/main/desktop/builtin-skills/cosyvoice-ssml
Command: npx skills add https://github.com/Jamailar/RedBox --skill cosyvoice-ssml

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Digital-human talking-head videos need expressive, correctly pronounced voiceover audio, but raw scripts sent directly to CosyVoice TTS produce flat or mispronounced speech. This Skill turns approved voiceover lines into fine-grained CosyVoice SSML segments with controlled rate, pitch, volume, pauses, and pronunciation fixes before calling voice.speech.

Core Features & Use Cases

  • SSML Performance Design: Splits approved scripts into performable segments, each with a complete <speak rate pitch volume> block and a per-segment style prompt.
  • Pronunciation Correction: Uses <say-as>, <phoneme>, and <sub> to fix digits, dates, amounts, polyphonic characters, abbreviations, and keyboard shortcuts.
  • Strict Constraint Enforcement: Blocks invalid markup such as <prosody>, MiniMax <#0.6#> pauses, emotion fields, and negative pitch values, then runs a self-check before a single voice.speech call.
  • Use Case: Inside a video-director digital-human workflow, an approved product-explainer script is split into hook, selling-point, and CTA segments, each synthesized with distinct pacing and tone, then merged into one final audio track.

Quick Start

Within a video-director digital-human voiceover flow, invoke this skill to convert the approved script into CosyVoice SSML segments and synthesize the audio with one voice.speech call.

Frequently Asked Questions about cosyvoice-ssml

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate expressive CosyVoice TTS audio from a script?

Split the script into performance segments and wrap each in a speak tag with explicit rate, pitch, and volume attributes, then submit all segments in one voice.speech call. Add a per-segment prompt describing the vocal style for that block.

What SSML tags does CosyVoice support?

CosyVoice supports speak, break, sub, phoneme, soundEvent, and say-as tags only. It does not support prosody, emphasis, emotion fields, or MiniMax-style pause markers like <#0.6#>.

Can I use this skill for normal voiceover or short video requests?

No. This skill is an internal sub-step of the video-director digital-human and VideoRetalk pipeline. Ordinary chat, audio, short video, product video, or ad requests must go through video-director first.

Why is pitch="-1" invalid in CosyVoice SSML?

CosyVoice pitch is a positive multiplier between 0.5 and 2, not a semitone offset like MiniMax. Negative or zero values are rejected; use 0.86-0.96 for a lower, steadier voice instead.

How do I fix mispronounced numbers or polyphonic Chinese characters in TTS?

Use say-as with interpret-as values like digits, date, currency, or telephone for numbers and IDs, and phoneme with alphabet="py" for polyphonic Chinese words. Use sub to replace abbreviations or symbols with natural spoken forms.

When should I use segments instead of a single input in voice.speech?

Use segments for long or multi-paragraph scripts, product explainers, tutorials, and promotional voiceovers where tone shifts between sections. Only very short, neutral single sentences should use a single input field.