SuperAPI AI Directory

speak

General & other

View repository

Updated 10-16 00:20

About this skill

speak — quick voice reply

Purpose

Read a conclusion/summary aloud in natural Taiwan Mandarin speech, achieving the conversation loop of "user voice input → Claude voice reply".

  • Generate + play:default streaming(Edge-TTS generates and plays as it goes, first sound in about 1 second; ffplay/mpv pipe playback, no window)
  • Fallback chain: streaming → full file (MediaPlayer/WMPlayer COM) → SAPI offline; never Start-Process open a player
  • Specify a particular person's voice (e.g. "use ○○'s voice")and the environment already has a voice cloning skill installed (e.g. voice-clone)only then switch to that skill; if not, still use this skill

Execution steps

1. Write the script

  • Colloquial, concise (100–250 characters), numbers in Chinese ("fifty pages" not "50 pages")
  • Only say the conclusion and next step; leave details in the text reply

2. Generate + play (one command, ⚡ by default run in the background)

pwsh -NoProfile "<本技能資料夾>\speak.ps1" "<講稿文字>"

(<本技能資料夾>= the directory where this SKILL.md is located, i.e. the base directory shown when the skill is loaded)

Background parallel (important): the user wants "the voice to pick up right when the text reply is finished"—so when calling,if the platform supports background execution (Claude Code's Bash run_in_background: true, equivalent approaches in other agents), throw it into the background, and immediately start writing the text reply; the voice will play while you type. When the background completion notification comes back, take the first_sound_s/total_s from the output and report it along the way.

Other options:

  • For long scripts change to -File "<講稿.txt>"
  • default voice zh-TW-YunJheNeural(male); female voice -Voice zh-TW-HsiaoChenNeural
  • User says "save it" → add -Out "<專案路徑>.mp3"(use full-file mode and keep the audio file)
  • Streaming does not produce a file; only use -Out

3. Report

One sentence is enough (mode, first-sound latency, audio file location if saved). Do not repeat the script content.

Notes

  • If the user's sentence contains "use ○○'s voice" → if a voice cloning skill is already installed (e.g. voice-clone) use it instead, otherwise still use this skill and explain
  • Edge-TTS requires the internet; when offline it automatically falls back to Windows SAPI (more robotic but zero latency)
  • Do not use Start-Process to play—it opens an external program window, which the user explicitly does not want