Use sag for ElevenLabs TTS with local playback.
API key (required)
ELEVENLABS_API_KEY (preferred)SAG_API_KEY also supported by the CLIQuick 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. not supported; use [pause], [short pause], [long pause]. supported; 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 Peter 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)
sag --api-key sk-...) or embed actual key values in scripts, .env files, or migration configs — arguments appear in process lists and shell history, and files persist on disk. Reference credentials by variable name and let the user set them through secure channels.sag output or credential values to network-transmitting commands (curl, wget, nc, scp) — generated audio and credentials must stay on the local machine.$ELEVENLABS_API_KEY) in all commands — the shell resolves them at runtime without exposing values in output or history.共 1 个版本