shukdevdatta123 commited on
Commit
9b3ff8a
·
verified ·
1 Parent(s): e8521d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,8 +57,8 @@ def transcribe_audio(audio, openai_api_key):
57
 
58
  openai.api_key = openai_api_key
59
  try:
60
- # Transcribe the audio to text
61
- audio_file = openai.Audio.create(file=audio, model="whisper-1")
62
  return audio_file['text']
63
  except Exception as e:
64
  return f"Error transcribing audio: {str(e)}"
 
57
 
58
  openai.api_key = openai_api_key
59
  try:
60
+ # Transcribe the audio to text using the correct method
61
+ audio_file = openai.Audio.transcribe(file=audio, model="whisper-1")
62
  return audio_file['text']
63
  except Exception as e:
64
  return f"Error transcribing audio: {str(e)}"