transcribeExternal

fun transcribeExternal(audioBytes: ByteArray, baseUrl: String, apiKey: String?, model: String, language: String?): String

Sendet Audiobytes an einen externen OpenAI-kompatiblen „/v1/audio/transcriptions“-Endpunkt.

Return

Der transkribierte Text.

Parameters

audioBytes

Raw audio bytes (WebM/Opus, WAV, etc.).

baseUrl

Base URL of the external API (e.g. "https://api.openai.com").

apiKey

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.