SpeechProviderSelector
Routes speech provider configuration to the appropriate TTS or STT client.
Provider selection follows the same provider/model prefix pattern used for LLM providers. The model format, set through SPEECH_TTS_MODEL / SPEECH_STT_MODEL (see org.llm4s.speech.config.SpeechConfigLoader), is: openai/tts-1, elevenlabs/
Attributes
- Source
- SpeechProviderSelector.scala
- Graph
-
- Supertypes
- Self type
Members list
Value members
Concrete methods
Returns a SpeechToText implementation for the given configuration. Dispatches based on cfg.provider:
Returns a SpeechToText implementation for the given configuration. Dispatches based on cfg.provider:
- "openai" -> org.llm4s.speech.stt.provider.OpenAISTTClient
- "azure" -> org.llm4s.speech.stt.provider.AzureSTTClient
Value parameters
- cfg
-
STT provider configuration
Attributes
- Returns
-
Right(SpeechToText) on success, Left(ConfigurationError) for unknown provider
- Source
- SpeechProviderSelector.scala
Returns a TextToSpeech implementation for the given configuration. Dispatches based on cfg.provider:
Returns a TextToSpeech implementation for the given configuration. Dispatches based on cfg.provider:
- "openai" -> org.llm4s.speech.tts.provider.OpenAITTSClient
- "elevenlabs" -> org.llm4s.speech.tts.provider.ElevenLabsTTSClient
- "azure" -> org.llm4s.speech.tts.provider.AzureTTSClient
Value parameters
- cfg
-
TTS provider configuration
Attributes
- Returns
-
Right(TextToSpeech) on success, Left(ConfigurationError) for unknown provider
- Source
- SpeechProviderSelector.scala
Parses a provider/model format string and returns the provider and model parts.
Parses a provider/model format string and returns the provider and model parts.
Value parameters
- modelSpec
-
Format: "provider/model", e.g. "openai/tts-1", "elevenlabs/voice-id"
Attributes
- Returns
-
Right((provider, model)) or Left(ConfigurationError) if format is invalid
- Source
- SpeechProviderSelector.scala
The STT client selected by llm4s.speech.stt.model, with credentials read from configuration.
The STT client selected by llm4s.speech.stt.model, with credentials read from configuration.
Attributes
- Source
- SpeechProviderSelector.scala
As stt, reading source.
The TTS client selected by llm4s.speech.tts.model, with credentials read from configuration.
The TTS client selected by llm4s.speech.tts.model, with credentials read from configuration.
Attributes
- Source
- SpeechProviderSelector.scala
As tts, reading source.
