Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -152,7 +152,7 @@ def transcribe(audio, text):
|
|
| 152 |
os.rename(audio, audio_filename_with_extension)
|
| 153 |
audio_file = open(audio_filename_with_extension, "rb")
|
| 154 |
# Transcribe the audio file using the whisper-1 model
|
| 155 |
-
transcript = openai.
|
| 156 |
|
| 157 |
user_input = transcript.get("text", "") if isinstance(transcript, dict) else ""
|
| 158 |
|
|
|
|
| 152 |
os.rename(audio, audio_filename_with_extension)
|
| 153 |
audio_file = open(audio_filename_with_extension, "rb")
|
| 154 |
# Transcribe the audio file using the whisper-1 model
|
| 155 |
+
transcript = openai.audio.transcribe.create("whisper-1", audio_file)
|
| 156 |
|
| 157 |
user_input = transcript.get("text", "") if isinstance(transcript, dict) else ""
|
| 158 |
|