amir22010 commited on
Commit
5f59609
·
verified ·
1 Parent(s): 4a10ecf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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()