org.llm4s.speech

Members list

Type members

Classlikes

sealed trait AudioFormat extends Product, Serializable

Output representation for generated audio.

Output representation for generated audio.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object Mp3
object RawPcm16
object WavPcm16
object AudioFormat

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait AudioInput extends Product, Serializable

Audio input representations used by speech components.

Audio input representations used by speech components.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class BytesAudio
class FileAudio
class StreamAudio
object AudioInput

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
AudioInput.type
final case class AudioMeta(sampleRate: Int, numChannels: Int, bitDepth: Int)

Basic audio metadata.

Basic audio metadata.

For AudioFormat.Mp3 audio bitDepth is 0, meaning "not applicable": MP3 is compressed, so it has no sample width, and a duration or frame count cannot be computed from data.length and these fields. sampleRate and numChannels are then the service's nominal values for the format it was asked for, not read from the stream.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class GeneratedAudio(data: Array[Byte], meta: AudioMeta, format: AudioFormat)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Routes speech provider configuration to the appropriate TTS or STT client.

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/ , azure/ (TTS) openai/whisper-1, azure/en-US (STT)

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type