OpenAI
OpenAIWhisperTranscriber
Bases: BaseModel
Transcriber using OpenAI's Whisper API.
api_key
class-attribute
instance-attribute
api_key: str | None = None
API key for OpenAI's Whisper API.
base_url
class-attribute
instance-attribute
base_url: str | None = None
Base URL for OpenAI's Whisper API.
timeout
class-attribute
instance-attribute
timeout: PositiveInt = 120
Timeout for transcription in seconds.
model
class-attribute
instance-attribute
model: Literal['whisper-1'] = 'whisper-1'
Model to use for transcription.
temperature
class-attribute
instance-attribute
The sampling temperature for the model.
language
class-attribute
instance-attribute
language: LanguageAlpha2 | None = None
Language of the transcription.
transcribe
transcribe(audio_asset: AudioAsset) -> Transcription
Transcribe audio using OpenAI's Whisper API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
audio_asset |
AudioAsset
|
The audio asset to transcribe. |
required |
Returns:
Type | Description |
---|---|
Transcription
|
The transcription words. |