WhisperTranscriptionClient

Zustandsloser HTTP-Client zum Weiterleiten von Audio an einen Whisper-kompatiblen Transkriptionsendpunkt.

Unterstützt zwei Modi:

  • Lokal: mehrteiliger POST an „http://127.0.0.1:/inference“ (whisper.cpp-Server).

  • Extern: mehrteiliger POST an „/v1/audio/transcriptions“ (OpenAI-kompatible API).

Parameters

log

Log function for diagnostic output.

Constructors

Link copied to clipboard
constructor(log: (CodBi.LogLevel, String) -> Unit)

Functions

Link copied to clipboard
fun transcribeExternal(audioBytes: ByteArray, baseUrl: String, apiKey: String?, model: String, language: String?): String

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

Link copied to clipboard
fun transcribeLocal(audioBytes: ByteArray, port: Int, language: String?): String

Sendet Audiobytes an den lokalen Whisper-Server-Endpunkt „/inference“.