Install
openclaw skills install jarvis-ttsJarvis TTS text-to-speech using Microsoft edge-tts with afplay playback. Use when users request voice output, audio responses, or text-to-speech. Provides natural-sounding Chinese TTS.
openclaw skills install jarvis-tts用 Microsoft edge-tts 生成高质量语音,然后用 macOS afplay 播放。提供自然流畅的中文语音输出。
jarvis-tts.sh "要说的内容"
# 简单回复
jarvis-tts.sh "好的,马上执行"
# 长文本
jarvis-tts.sh "从一数到一百:一、二、三...一百。数完了!"
# 指定语音
jarvis-tts.sh "你好" --voice zh-CN-YunxiNeural
zh-CN-YunxiNeural - 阳光活泼(默认)zh-CN-YunjianNeural - 激情运动风zh-CN-YunyangNeural - 专业新闻播报zh-CN-XiaoxiaoNeural - 温暖zh-CN-XiaoyiNeural - 活泼文字输入 → edge-tts 生成 MP3 → afplay 播放 → 完成
Python 脚本,执行 TTS 生成和播放。
依赖:
pip3 install edge-tts)用法:
python3 jarvis-tts.py "要说的内容"
Shell 封装脚本,方便直接调用。
用法:
./jarvis-tts.sh "要说的内容"
python3 -m edge_tts \
--voice zh-CN-YunxiNeural \
--text "要说的内容" \
--write-media /tmp/output.mp3
如需支持其他平台:
aplay 或 paplay 替代 afplaypowershell -c (New-Object Media.SoundPlayer) 播放scripts/jarvis-tts.py - 主脚本scripts/jarvis-tts.sh - Shell 封装