Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,11 @@ import requests
|
|
6 |
import openai
|
7 |
from openai import OpenAI
|
8 |
|
9 |
-
client = OpenAI(api_key = "<API_KEY>")
|
10 |
-
|
11 |
prompt = "Type and press Enter"
|
12 |
|
13 |
|
14 |
def record_text(audio_file,api_key):
|
15 |
-
client = OpenAI(api_key =
|
16 |
audio_file = open(audio_file, "rb")
|
17 |
transcript = client.Audio.transcribe("whisper-1", audio_file)
|
18 |
text = transcript['text']
|
|
|
6 |
import openai
|
7 |
from openai import OpenAI
|
8 |
|
|
|
|
|
9 |
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.transcribe("whisper-1", audio_file)
|
16 |
text = transcript['text']
|