复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-sag-e7f52e7c360e ,按照其中的说明把「sag」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use sag for ElevenLabs TTS with local playback.
API key (required)
ELEVENLABS_API_KEY (preferred)SAG_API_KEY also supported by the CLI--api-key-file, ELEVENLABS_API_KEY_FILE, or SAG_API_KEY_FILEQuick start
sag "Hello there"sag speak -v "Roger" "Hello"sag voicessag prompting (model-specific tips)Model notes
eleven_v3 (expressive)eleven_multilingual_v2eleven_flash_v2_5Pronunciation + delivery rules
--normalize auto (or off if it harms names).--lang en|de|fr|... to guide normalization.<break> not supported; use [pause], [short pause], [long pause].<break time="1.5s" /> supported; <phoneme> not exposed in sag.v3 audio tags (put at the entrance of a line)
[whispers], [shouts], [sings][laughs], [starts laughing], [sighs], [exhales][sarcastic], [curious], [excited], [crying], [mischievously]sag "[whispers] keep this quiet. [short pause] ok?"Voice defaults
ELEVENLABS_VOICE_ID or SAG_VOICE_IDConfirm voice + speaker before long output.
When the user asks for a "voice" reply (e.g., "crazy scientist voice", "explain in voice"), generate audio and send it:
# Generate audio file
sag -v Clawd -o /tmp/voice-reply.mp3 "Your message here"
# Then include in reply:
# MEDIA:/tmp/voice-reply.mp3
Voice character tips:
[excited] tags, dramatic pauses [short pause], vary intensity[whispers] or slower pacing[sings] or [shouts] sparinglyDefault voice for Clawd: lj2rcrvANS3gaWWnczSX (or just -v Clawd)