- name
- moark-tts
- description
- Text-to-Speech (TTS) and voice-feature skill for Gitee AI that lets the user choose audiofly, chattts, cosyvoice2, cosyvoice3, cosyvoice-300m, fish-speech-1.2-sft, index-tts-1.5, index-tts-2, glm-tts, megatts3, moss-ttsd-v0.5, qwen-tts, spark-tts-0.5b, step-audio-tts-3b, or vibevoice-large, then fills in only model-specific parameters for speech or voice feature extraction, including multi-item Qwen3-TTS inputs with built-in or custom voices.
- metadata
- openclaw
- emoji
- 🎤
- requires
- bins
- [ "python" ]
- env
- [ "GITEEAI_API_KEY" ]
- primaryEnv
- GITEEAI_API_KEY
Text-to-Speech (TTS)
This skill supports Gitee AI TTS plus CosyVoice voice feature extraction workflows. It supports fifteen user-facing model choices for TTS:
audioflychatttscosyvoice2cosyvoice3cosyvoice-300mfish-speech-1.2-sftindex-tts-1.5index-tts-2glm-ttsmegatts3moss-ttsd-v0.5qwen-ttsspark-tts-0.5bstep-audio-tts-3bvibevoice-large
When the user does not specify a model, ask them to choose one. After the model is chosen, only ask for parameters that are relevant to that model.
Usage
Use the bundled script to generate speech.
python {baseDir}/scripts/perform_tts.py --model cosyvoice2 --text "你好,我是模力方舟。" --voice alloy --api-key YOUR_API_KEYFor CosyVoice-300M voice feature extraction (voice cloning prep), use:
python {baseDir}/scripts/perform_voice_feature_extraction.py --model FunAudioLLM-CosyVoice-300M --prompt "提供用于声纹提取的提示文本" --file-url "https://example.com/sample.mp3" --api-key YOUR_API_KEYOptions
--modelrequired:audiofly,chattts,cosyvoice2,cosyvoice3,cosyvoice-300m,fish-speech-1.2-sft,
index-tts-1.5, index-tts-2, glm-tts, megatts3, moss-ttsd-v0.5, qwen-tts, spark-tts-0.5b, step-audio-tts-3b, or vibevoice-large
--textrequired in general: text to synthesize. For Qwen3-TTS multi-input mode (--qwen-inputs-json),--textis
optional
--modeoptional:auto,sync, orasync--promptoptional: model-specific style prompt such as ChatTTS tags--prompt-textoptional: reference transcript for style-conditioned models--prompt-audio-urloptional: reference audio URL for style-conditioned models--qwen-inputs-jsonoptional: structured Qwen3-TTSinputsJSON (array/object). Supports mixed built-in and custom
voice items
--speakeroptional: Qwen3-TTS built-in speaker for single input (Vivian,Serena,Uncle_Fu,Dylan,Eric,
Ryan, Aiden, Ono_Anna, Sohee)
--languageoptional: Qwen3-TTS language for single input (ChineseorEnglish)--instructionoptional: Qwen3-TTS style instruction for single input--prompt-audio-urlsoptional:vibevoice-largereference audio; supports one URL or JSON array string such as
["https://a.wav","https://b.wav"]
--emo-audio-prompt-urloptional: emotion reference audio URL for IndexTTS-2--emo-alphaoptional: emotion mixing weight for IndexTTS-2 audio emotion control--emo-textoptional: emotion control text for IndexTTS-2--use-emo-textoptional: enable or disableemo_textfor IndexTTS-2 (true/false)--prompt-wav-urloptional: reference prompt WAV URL for CosyVoice2 or CosyVoice3--voice-urloptional: reference voice audio URL for ChatTTS or fish-speech-1.2-sft cloning--instruct-textoptional: model-specific instruction text such as CosyVoice2 or CosyVoice3 speaking style guidance--seedoptional: model-specific seed value such as CosyVoice2 or CosyVoice3--audio-modeoptional:singleorroleformoss-ttsd-v0.5(required when mode cannot be inferred from fields)--prompt-audio-single-urloptional: single-speaker reference audio URL formoss-ttsd-v0.5single mode--prompt-text-singleoptional: single-speaker reference transcript formoss-ttsd-v0.5single mode--prompt-audio-1-urloptional: speaker-1 reference audio URL formoss-ttsd-v0.5role mode--prompt-text-1optional: speaker-1 reference transcript formoss-ttsd-v0.5role mode--prompt-audio-2-urloptional: speaker-2 reference audio URL formoss-ttsd-v0.5role mode--prompt-text-2optional: speaker-2 reference transcript formoss-ttsd-v0.5role mode--use-normalizeoptional: enable or disableuse_normalizeformoss-ttsd-v0.5(true/false)--prompt-languageoptional: prompt language hint for models such as MegaTTS3--intelligibility-weightoptional: pronunciation intelligibility weight for models such as MegaTTS3--similarity-weightoptional: timbre similarity weight for models such as MegaTTS3--temperatureoptional: model-specific sampling temperature--top-poptional: model-specific top-p sampling value--top-koptional: model-specific top-k sampling value--genderoptional: async TTS gender hint--pitchoptional: async TTS pitch hint--speedoptional: async TTS speed hint (for example CosyVoice3, Spark-TTS-0.5B, or Qwen3-TTS)--num-inference-stepsoptional: AudioFly generation step count--guidance-scaleoptional: AudioFly classifier-free guidance scale--output-formatoptional: AudioFly or Qwen3-TTS output format such asmp3orwav--voiceoptional: OpenAI-compatible voice field when supported by the target model--extra-body-jsonoptional: JSON object for explicitly requested undocumented fields--response-data-formatoptional:urlorblobfor sync TTS--outputoptional: output file path when sync TTS returns binary audio--failover-enabledoptional: request headerX-Failover-Enabled, defaults totrueperform_voice_feature_extraction.pyoptions:--prompt,--file-url(URL only),--model(default
FunAudioLLM-CosyVoice-300M), --failover-enabled, --output, --api-key
Workflow
- Determine whether the user wants speech synthesis or CosyVoice voice-feature extraction.
- For speech synthesis: ask the user to choose one of
audiofly,chattts,cosyvoice2,cosyvoice3,
cosyvoice-300m, fish-speech-1.2-sft, index-tts-1.5, index-tts-2, glm-tts, megatts3, moss-ttsd-v0.5, qwen-tts, spark-tts-0.5b, step-audio-tts-3b, or vibevoice-large if not specified.
- For speech synthesis: read references/models.md, gather missing model-specific params, and
execute perform_tts.py.
- For voice-feature extraction: execute
perform_voice_feature_extraction.pywith--promptand URL-only
--file-url.
- Parse script output.
- For TTS output, prioritize
AUDIO_URL:thenAUDIO_FILE:thenTTS_RESULT:. - For voice feature output, prioritize
VOICE_URL:(if present), otherwise returnVOICE_FEATURE_FILE:and summarize
VOICE_FEATURE_RESULT:.
Notes
- Keep the answer language consistent with the user's language.
- This script is standard-library only and is intended to run directly with
python; do not requireuvfor
moark-tts.
- If
GITEEAI_API_KEYis missing, remind the user to provide--api-key. - By default, all TTS requests send
X-Failover-Enabled: true. Only set--failover-enabled falsewhen the user
explicitly needs to disable failover.
audioflyis mapped to the official model nameAudioFly. Use async mode only. When the user shows an OpenAI SDK
example that puts num_inference_steps, guidance_scale, or output_format under extra_body, map them to --num-inference-steps, --guidance-scale, and --output-format.
chatttsis mapped to the official model nameChatTTS. When the user shows an OpenAI SDK example that puts
prompt, temperature, top_P, top_K, or voice_url under extra_body, map them to --prompt, --temperature, --top-p, --top-k, and --voice-url.
cosyvoice2is mapped to the official model nameCosyVoice2. When the user shows an OpenAI SDK example that puts
prompt_wav_url, prompt_text, instruct_text, or seed under extra_body, map them to --prompt-wav-url, --prompt-text, --instruct-text, and --seed.
cosyvoice3is mapped to the official model nameCosyVoice3. Use async mode only. When the user shows an OpenAI SDK
example that puts prompt_wav_url, prompt_text, instruct_text, speed, or seed under extra_body, map them to --prompt-wav-url, --prompt-text, --instruct-text, --speed, and --seed.
cosyvoice-300mis mapped toFunAudioLLM-CosyVoice-300Mfor sync/audio/speech. Map OpenAIextra_body.voice_url
to --voice-url.
- CosyVoice voice-feature extraction uses
/audio/voice-feature-extractionand is handled by
perform_voice_feature_extraction.py; --file-url must be an http(s) URL (no local file path support).
fish-speech-1.2-sftuses sync/audio/speech. When the user shows an OpenAI SDK example that putsvoice_urlunder
extra_body, map it to --voice-url.
index-tts-1.5currently uses the sync/audio/speechendpoint. When the user shows an OpenAI SDK example that puts
prompt_audio_url under extra_body, map it to the script's --prompt-audio-url.
index-tts-2supports four emotion-control patterns: sync/async + audio-emotion/text-emotion. Map
emo_audio_prompt_url + emo_alpha to --emo-audio-prompt-url + --emo-alpha; map emo_text + use_emo_text to --emo-text + --use-emo-text. In auto mode it defaults to sync; when user asks async, force --mode async.
megatts3is mapped to the official model nameMegaTTS3. When the user shows an OpenAI SDK example that puts
prompt_language, intelligibility_weight, or similarity_weight under extra_body, map them to --prompt-language, --intelligibility-weight, and --similarity-weight.
step-audio-tts-3bis mapped to the official model nameStep-Audio-TTS-3B. When the user shows an OpenAI SDK
example that puts prompt_audio_url and prompt_text under extra_body, map them to --prompt-audio-url and --prompt-text.
spark-tts-0.5bis mapped to the official model nameSpark-TTS-0.5B. Use async mode only. For plain synthesis, just
pass text. For voice cloning, map prompt_audio_url and prompt_text to --prompt-audio-url and --prompt-text; gender/pitch/speed can be passed when explicitly requested.
qwen-ttsis mapped to the official model nameQwen3-TTS. Use async mode only. Prefer structuredinputsitems:
- Built-in speaker item: prompt + speaker + optional language (Chinese/English) + optional instruction. - Custom voice item: prompt + prompt_audio_url + prompt_text + optional language + optional instruction. - Use --qwen-inputs-json for multiple items in one request; use --speaker/--language/--instruction for single-item mode. - Built-in speakers: Vivian, Serena, Uncle_Fu, Dylan, Eric, Ryan, Aiden, Ono_Anna, Sohee.
moss-ttsd-v0.5is mapped to the official model nameMOSS-TTSD-v0.5. Use async mode only. Map single mode fields
prompt_audio_single_url + prompt_text_single to --prompt-audio-single-url + --prompt-text-single, and role mode fields (prompt_audio_1_url, prompt_text_1, prompt_audio_2_url, prompt_text_2) to the matching CLI options. Pass audio_mode through --audio-mode and use_normalize through --use-normalize.
vibevoice-largeis mapped to the official model nameVibeVoice-Large. Use async mode only. Mapprompt_audio_urls
to --prompt-audio-urls, and accept both a single URL string and a JSON array string. When the user provides only prompt_audio_url, map it into prompt_audio_urls automatically for compatibility.
glm-ttscurrently exposes only the basic sync request in the official OpenAPI spec.- Do not invent model parameters. If a field is not documented for that model, only pass it when the user explicitly
asked for it and use --extra-body-json.