Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ prompt = "Type and press Enter"
|
|
12 |
def record_text(audio_file,api_key):
|
13 |
client = OpenAI(api_key = api_key)
|
14 |
audio_file = open(audio_file, "rb")
|
15 |
-
transcript = client.
|
16 |
text = transcript['text']
|
17 |
return text
|
18 |
|
|
|
12 |
def record_text(audio_file,api_key):
|
13 |
client = OpenAI(api_key = api_key)
|
14 |
audio_file = open(audio_file, "rb")
|
15 |
+
transcript = client.audio.transcribe("whisper-1", audio_file)
|
16 |
text = transcript['text']
|
17 |
return text
|
18 |
|