ElevenLabs API bindings: text-to-speech (full, with character
timestamps, and streaming) in ::elevenlabs::tts, Scribe
speech-to-text in ::elevenlabs::stt, sound effects in
::elevenlabs::sound, voices, models, generation history, account
info, and webhook verification in ::elevenlabs::webhooks.
Pairs with the messaging packages for voice agents: Telegram voice
replies, phone agents (ulaw_8000 output), narrated summaries.
Setup: context variable elevenlabs.api.key (from
https://elevenlabs.io/app/settings/api-keys), or a per-call api-key
in the trailing opts Map of any API-calling function (see
::elevenlabs::api).
Quick start
::tts ::elevenlabs::tts
::stt ::elevenlabs::stt
audio ::tts/text-to-speech(::elevenlabs/GEORGE_VOICE_ID, ::tts/TextToSpeechRequest({
text: "Hello from Hot!",
model_id: "eleven_multilingual_v2"
}))
// audio is Bytes (mp3 by default): write it, send it, play it
::hot::file/write-file-bytes("hello.mp3", audio)
// ...and transcribe it back
::stt/transcript-text(::stt/speech-to-text(audio))
Values
BASE_URL
BASE_URL: Str "https://api.elevenlabs.io"
GEORGE_VOICE_ID
GEORGE_VOICE_ID: Str "JBFqnCBsd6RMkjVDRZzb"
RACHEL_VOICE_ID
RACHEL_VOICE_ID: Str "21m00Tcm4TlvDq8ikWAM"