Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def combine_audio_files(audio_files):
|
|
32 |
w = wave.open(infile, 'rb')
|
33 |
data.append([w.getparams(), w.readframes(w.getnframes())] )
|
34 |
w.close()
|
35 |
-
os.remove(infile) # Remove temporary files
|
36 |
output = wave.open(outfile, 'wb')
|
37 |
output.setparams(data[0][0])
|
38 |
for i in range(len(data)):
|
@@ -132,7 +132,6 @@ async def greet(product,description):
|
|
132 |
audio_list = audio_list + [text_to_speech(delta.get('content', ''))]
|
133 |
processed_audio = combine_audio_files(audio_list)
|
134 |
partial_message = partial_message + delta.get('content', '')
|
135 |
-
audio_list = [os.path.join(os.getcwd(), "sounds.wav")]
|
136 |
yield processed_audio, partial_message
|
137 |
|
138 |
audio = gr.Audio()
|
|
|
32 |
w = wave.open(infile, 'rb')
|
33 |
data.append([w.getparams(), w.readframes(w.getnframes())] )
|
34 |
w.close()
|
35 |
+
#os.remove(infile) # Remove temporary files
|
36 |
output = wave.open(outfile, 'wb')
|
37 |
output.setparams(data[0][0])
|
38 |
for i in range(len(data)):
|
|
|
132 |
audio_list = audio_list + [text_to_speech(delta.get('content', ''))]
|
133 |
processed_audio = combine_audio_files(audio_list)
|
134 |
partial_message = partial_message + delta.get('content', '')
|
|
|
135 |
yield processed_audio, partial_message
|
136 |
|
137 |
audio = gr.Audio()
|