ElevenLabsTTSClient

org.llm4s.speech.tts.provider.ElevenLabsTTSClient
See theElevenLabsTTSClient companion object
final class ElevenLabsTTSClient(config: TTSConfig, httpClient: Llm4sHttpClient) extends TextToSpeech

ElevenLabs text-to-speech (POST /v1/text-to-speech/{voice_id}).

Requests output_format=pcm_24000 (raw 24 kHz, 16-bit, mono little-endian samples), so GeneratedAudio.data is headerless PCM described by an honest AudioMeta. Write it out with org.llm4s.speech.io.WavFileGenerator.saveAsWav. options.voice overrides the configured voice id.

Value parameters

config

configuration from org.llm4s.speech.config.SpeechConfigLoader.tts; model is the ElevenLabs model_id and voice the voice id

httpClient

HTTP transport, replaceable in tests

Attributes

Companion
object
Graph
Supertypes
trait TextToSpeech
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def synthesize(text: String, options: TTSOptions): Result[GeneratedAudio]

Attributes

Definition Classes

Concrete fields

override val name: String