Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,11 @@ 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.audio.
|
16 |
-
|
17 |
-
|
|
|
|
|
18 |
|
19 |
# sound = audio_file
|
20 |
# sound_type = sound.split(".")
|
|
|
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.transcriptions.create(
|
16 |
+
model="whisper-1",
|
17 |
+
file=audio_file
|
18 |
+
)
|
19 |
+
return transcript
|
20 |
|
21 |
# sound = audio_file
|
22 |
# sound_type = sound.split(".")
|