Model RemoteStt
ml/remote/stt::RemoteStt
Parameters
↳ const api_key: Option<string>
↳ const backend: string = "openai"
↳ const base_url: string = ""
↳ const model: string = ""
Remote speech-to-text provider configuration.
Holds the connection parameters for a remote speech-to-text service.
backend: provider name (default"openai"); see the table below.api_key: API key for authentication (omit for unauthenticated endpoints).base_url: override the provider base URL (optional).model: model identifier — see the table below for recommended values per backend.
Backends
backend | api_key | Example model | Model list |
|---|---|---|---|
"openai" | OpenAI API key | "whisper-1" | https://platform.openai.com/docs/models |
"elevenlabs" | ElevenLabs key | "scribe_v1" | https://elevenlabs.io/docs/speech-to-text |
ℹ️ Use RemoteStt together with transcribe.
use ml/remote/stt::RemoteStt
use ml/remote/stt::transcribe
treatment example()
model stt: RemoteStt(backend = "openai", api_key = "sk-...", model = "whisper-1")
input audio: Stream<byte>
output transcript: Block<string>
{
transcribe[stt=stt]()
Self.audio -> transcribe.audio,transcript -> Self.transcript
}