org.llm4s.speech.stt.provider.OpenAISTTClient
See theOpenAISTTClient companion object
final class OpenAISTTClient(config: STTConfig, httpClient: Llm4sHttpClient) extends SpeechToText
OpenAI speech-to-text (POST /v1/audio/transcriptions, the Whisper API).
FileAudio is uploaded as it is; BytesAudio and StreamAudio are WAV data, as for the other STT engines, and are staged in a temporary file that is deleted afterwards.
options.language is sent as the ISO 639-1 prefix of the tag (en-US becomes en), options.prompt as prompt, and options.enableTimestamps switches the request to verbose_json with word granularity.
Value parameters
- config
-
configuration from org.llm4s.speech.config.SpeechConfigLoader.stt
- httpClient
-
HTTP transport, replaceable in tests
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
In this article