Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ if API_KEY:
|
|
12 |
def transcribe_text_to_voice(audio_location):
|
13 |
# Transcribe audio to text using Whisper API
|
14 |
with open(audio_location, "rb") as audio_file:
|
15 |
-
transcript = openai.Audio.
|
16 |
model="whisper-1", file=audio_file
|
17 |
)
|
18 |
return transcript['text']
|
|
|
12 |
def transcribe_text_to_voice(audio_location):
|
13 |
# Transcribe audio to text using Whisper API
|
14 |
with open(audio_location, "rb") as audio_file:
|
15 |
+
transcript = openai.Audio.transcribe(
|
16 |
model="whisper-1", file=audio_file
|
17 |
)
|
18 |
return transcript['text']
|