Spaces:
Paused
Paused
Commit
·
0c2685b
1
Parent(s):
1e58dbf
clean up
Browse files- discourse.py +1 -2
discourse.py
CHANGED
@@ -2,7 +2,6 @@ import openai
|
|
2 |
import os
|
3 |
import azure.cognitiveservices.speech as speechsdk
|
4 |
|
5 |
-
LANGUAGE = "nl"
|
6 |
AUDIO_FILE_NAME = "audio_response.wav"
|
7 |
|
8 |
openai.api_key = os.environ['OPEN_AI_KEY']
|
@@ -20,7 +19,7 @@ Your responses should reveal a distinct sense of wit, but do not mention that yo
|
|
20 |
|
21 |
def transcribe(model: str, audio: str):
|
22 |
audio_file = open(audio, "rb")
|
23 |
-
transcript = openai.Audio.transcribe(model, audio_file
|
24 |
return transcript
|
25 |
|
26 |
def gen_response(model: str):
|
|
|
2 |
import os
|
3 |
import azure.cognitiveservices.speech as speechsdk
|
4 |
|
|
|
5 |
AUDIO_FILE_NAME = "audio_response.wav"
|
6 |
|
7 |
openai.api_key = os.environ['OPEN_AI_KEY']
|
|
|
19 |
|
20 |
def transcribe(model: str, audio: str):
|
21 |
audio_file = open(audio, "rb")
|
22 |
+
transcript = openai.Audio.transcribe(model, audio_file)
|
23 |
return transcript
|
24 |
|
25 |
def gen_response(model: str):
|