Whisper is OpenAI’s speech-transcription model. In the API, whisper-1 identifies the model used to convert recorded speech into text, including translation into English. section 7.2.1
A typical transcription workflow involves:
- Opening an audio file in binary read mode. section 7.2.1
- Calling the audio transcriptions endpoint with the file reference and model name. section 7.2.1
- Reading the returned transcript and using it as input for a larger application, such as a voice-driven database interface. section 7.3.4
Transcribing a recorded question
Given an audio_path pointing to a supported recording, open the file and pass it to whisper-1. A short literary quote can produce a readable transcript, while a voice-query application can pass the result to GPT-4o for SQL generation. section 7.2.1 section 7.2.3 section 7.3.4
import openai
client = openai.OpenAI()
with open(audio_path, 'rb') as audio_file: #1
#2
transcription = client.audio.transcriptions.create(
file=audio_file, model='whisper-1')
Use the compact Python listing to see the complete API call, including binary file opening, the audio transcription endpoint, and whisper-1. section 7.2.1

