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
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- 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
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
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
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
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.