Liking cljdoc? Tell your friends :D
Clojure only.

llm.sdk.speak

Driver for text-to-speech (TTS). The TTS counterpart to sdk/complete and sdk/transcribe.

Returns a SpeakResponse: {:audio/bytes byte-array :audio/content-type str :audio/model str? :response/usage Usage? :response/raw raw}.

Providers without a speak transport throw ex-info on call.

Driver for text-to-speech (TTS). The TTS counterpart to
sdk/complete and sdk/transcribe.

Returns a SpeakResponse: {:audio/bytes byte-array
                           :audio/content-type str
                           :audio/model str?
                           :response/usage Usage?
                           :response/raw raw}.

Providers without a speak transport throw ex-info on call.
raw docstring

speakclj

(speak provider-id request & {:keys [config]})

Send a canonical SpeakRequest and return a SpeakResponse.

Request keys: :speak/model model id (e.g. "tts-1", "eleven_multilingual_v2") :speak/input text to synthesize :speak/voice voice id (e.g. "alloy" or an ElevenLabs voice id) :speak/format :mp3|:opus|:aac|:flac|:wav|:pcm (provider-dependent) :speak/speed optional [0.25, 4.0] :speak/instructions optional style/affect prompt (OpenAI tts-1-hd / gpt-4o-mini-tts) :speak/provider-options extra provider-specific fields

Send a canonical SpeakRequest and return a SpeakResponse.

Request keys:
  :speak/model    model id (e.g. "tts-1", "eleven_multilingual_v2")
  :speak/input    text to synthesize
  :speak/voice    voice id (e.g. "alloy" or an ElevenLabs voice id)
  :speak/format   :mp3|:opus|:aac|:flac|:wav|:pcm (provider-dependent)
  :speak/speed    optional [0.25, 4.0]
  :speak/instructions  optional style/affect prompt (OpenAI tts-1-hd / gpt-4o-mini-tts)
  :speak/provider-options  extra provider-specific fields
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close