transcribe External
fun transcribeExternal(audioBytes: ByteArray, baseUrl: String, apiKey: String?, model: String, language: String?): String
Sends audio bytes to an external OpenAI-compatible /v1/audio/transcriptions endpoint.
Return
The transcribed text.
Parameters
audio Bytes
Raw audio bytes (WebM/Opus, WAV, etc.).
base Url
Base URL of the external API (e.g. "https://api.openai.com").
api Key
Bearer token / API key, or null if not required.
model
Model identifier (e.g. "whisper-1").
language
Optional BCP-47 language hint, or null for auto-detect.
Throws
If the external API returns a non-2xx HTTP status.