Interface OpenAIWhisperSpeechToTextProviderConfig

Configuration for the OpenAIWhisperSpeechToTextProvider.

interface OpenAIWhisperSpeechToTextProviderConfig {
    apiKey: string;
    baseUrl?: string;
    model?: string;
    fetchImpl?: {
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
    };
}

Properties

apiKey: string

OpenAI API key used for authentication. Sent as Authorization: Bearer <apiKey> in the request header.

baseUrl?: string

Base URL for the OpenAI API. Override for proxies, Azure OpenAI, or compatible third-party endpoints.

Default

'https://api.openai.com/v1'
model?: string

Default transcription model.

gpt-transcribe is the model OpenAI recommends for recorded speech. OpenAI removes whisper-1 from the API on 2027-02-26 and names gpt-live-transcribe or gpt-transcribe as the replacement, while its guide still sends callers who need word or segment timestamps to whisper-1. A call that asks for verbose_json, srt or vtt runs on whisper-1, which serves those formats, when no model is configured or the configured model is one of OpenAI's gpt- transcription models. A configured model of a whisper-compatible server keeps those calls, and a model named on the call is always used as given.

Default

'gpt-transcribe'
fetchImpl?: {
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
}

Custom fetch implementation for dependency injection in tests.

Type declaration

    • (input, init?): Promise<Response>
    • Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

    • (input, init?): Promise<Response>
    • Parameters

      • input: string | Request | URL
      • Optional init: RequestInit

      Returns Promise<Response>

Default

globalThis.fetch