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 Whisper model to use for transcription.

Default

'whisper-1'
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