org.llm4s.speech.config

Members list

Type members

Classlikes

final case class STTConfig(provider: String, model: String, apiKey: Secret, baseUrl: String, region: Option[String])

Configuration for a cloud STT provider, as produced by SpeechConfigLoader.stt.

Configuration for a cloud STT provider, as produced by SpeechConfigLoader.stt.

Value parameters

apiKey

API key for the provider

baseUrl

API base URL, without a trailing path (the endpoint path is added by the client)

model

Model identifier (OpenAI: whisper-1; Azure: the default recognition language, e.g. en-US)

provider

Provider name: "openai" or "azure"

region

Azure Speech region, when the provider is Azure

Attributes

Companion
object
Source
SpeechConfig.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object STTConfig

Default values for STTConfig, one set per cloud provider. SpeechConfigLoader falls back to them when the corresponding setting is absent.

Default values for STTConfig, one set per cloud provider. SpeechConfigLoader falls back to them when the corresponding setting is absent.

STTConfig#toString prints the API key as ***, so a config is safe to log.

Attributes

Companion
class
Source
SpeechConfig.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
STTConfig.type

Loads TTSConfig and STTConfig from the llm4s.speech block of the application configuration, whose defaults and environment variables are declared in this module's reference.conf.

Loads TTSConfig and STTConfig from the llm4s.speech block of the application configuration, whose defaults and environment variables are declared in this module's reference.conf.

Provider selection is the provider/model form used for chat models:

SPEECH_TTS_MODEL=openai/tts-1            OPENAI_API_KEY=...
SPEECH_TTS_MODEL=elevenlabs/<voice-id>   ELEVENLABS_API_KEY=...
SPEECH_TTS_MODEL=azure/en-US-JennyNeural AZURE_SPEECH_KEY=... AZURE_SPEECH_REGION=...
SPEECH_STT_MODEL=openai/whisper-1        OPENAI_API_KEY=...
SPEECH_STT_MODEL=azure/en-US             AZURE_SPEECH_KEY=... AZURE_SPEECH_REGION=...

Only the selected provider's credentials are required.

Attributes

Source
SpeechConfigLoader.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class TTSConfig(provider: String, model: String, voice: String, apiKey: Secret, baseUrl: String, region: Option[String])

Configuration for a cloud TTS provider, as produced by SpeechConfigLoader.tts.

Configuration for a cloud TTS provider, as produced by SpeechConfigLoader.tts.

Value parameters

apiKey

API key for the provider

baseUrl

API base URL, without a trailing path (the endpoint path is added by the client)

model

Model identifier (OpenAI: tts-1; ElevenLabs: the model_id; Azure: unused)

provider

Provider name: "openai", "elevenlabs", or "azure"

region

Azure Speech region, when the provider is Azure

voice

Voice (OpenAI: alloy; ElevenLabs: voice id; Azure: voice name)

Attributes

Companion
object
Source
SpeechConfig.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TTSConfig

Default values for TTSConfig, one set per cloud provider. SpeechConfigLoader falls back to them when the corresponding setting is absent.

Default values for TTSConfig, one set per cloud provider. SpeechConfigLoader falls back to them when the corresponding setting is absent.

TTSConfig#toString prints the API key as ***, so a config is safe to log.

Attributes

Companion
class
Source
SpeechConfig.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
TTSConfig.type