Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -154,7 +154,8 @@ def transcribe(audio, text):
|
|
| 154 |
# Transcribe the audio file using the whisper-1 model
|
| 155 |
transcript = openai.audio.transcriptions.create(model="whisper-1", file=audio_file)
|
| 156 |
print("Transcription:", transcript)
|
| 157 |
-
user_input = transcript("text") if isinstance(transcript, dict) else ""
|
|
|
|
| 158 |
print("Transcription:", user_input)
|
| 159 |
if text:
|
| 160 |
user_input = text
|
|
|
|
| 154 |
# Transcribe the audio file using the whisper-1 model
|
| 155 |
transcript = openai.audio.transcriptions.create(model="whisper-1", file=audio_file)
|
| 156 |
print("Transcription:", transcript)
|
| 157 |
+
# user_input = transcript("text") if isinstance(transcript, dict) else ""
|
| 158 |
+
user_input = transcript
|
| 159 |
print("Transcription:", user_input)
|
| 160 |
if text:
|
| 161 |
user_input = text
|