Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,14 +10,15 @@ prompt = "Type and press Enter"
|
|
10 |
|
11 |
|
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 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
return transcript
|
|
|
21 |
|
22 |
|
23 |
def api_calling(audio_file, prompt, api_key):
|
|
|
10 |
|
11 |
|
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 |
+
# response_format="text"
|
19 |
+
# )
|
20 |
+
# return transcript
|
21 |
+
return(str(path.getsize(file_path)/1000000)+'mb')
|
22 |
|
23 |
|
24 |
def api_calling(audio_file, prompt, api_key):
|