Spaces:
Runtime error
Runtime error
Commit
·
b450bc8
1
Parent(s):
3189246
correct variable issue
Browse files
app.py
CHANGED
|
@@ -885,6 +885,7 @@ def playsound1():
|
|
| 885 |
soundfilename = Filename_Chatbot
|
| 886 |
print("soundfilename:", soundfilename)
|
| 887 |
# return None
|
|
|
|
| 888 |
return gr.update(value = soundfilename)
|
| 889 |
# return soundfilename
|
| 890 |
# yield soundfilename
|
|
@@ -944,6 +945,7 @@ last_answer = ""
|
|
| 944 |
|
| 945 |
def SingleTalk(WavFile, history5):
|
| 946 |
global last_answer
|
|
|
|
| 947 |
ConvertText = speech_to_text(WavFile)
|
| 948 |
history5 = history5 + [(ConvertText, None)]
|
| 949 |
yield [None, None, history5]
|
|
|
|
| 885 |
soundfilename = Filename_Chatbot
|
| 886 |
print("soundfilename:", soundfilename)
|
| 887 |
# return None
|
| 888 |
+
Filename_Chatbot = ""
|
| 889 |
return gr.update(value = soundfilename)
|
| 890 |
# return soundfilename
|
| 891 |
# yield soundfilename
|
|
|
|
| 945 |
|
| 946 |
def SingleTalk(WavFile, history5):
|
| 947 |
global last_answer
|
| 948 |
+
global Filename_Chatbot
|
| 949 |
ConvertText = speech_to_text(WavFile)
|
| 950 |
history5 = history5 + [(ConvertText, None)]
|
| 951 |
yield [None, None, history5]
|