DEV Community

parmarjatin4911@gmail.com
parmarjatin4911@gmail.com

Posted on

ChatGPT Speech to Text Whisper API

ChatGPT Speech to Text Whisper API

import openai
client = openai.Client()

audio_file= open("speech.mp3", "rb")
transcript = client.audio.transcriptions.create(
model = "whisper-1",
file=audio_file
)
print(transcript.text)

Top comments (0)