Alidr79 commited on
Commit
07601c1
1 Parent(s): 57e9171

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -150,8 +150,9 @@ def master_fn(slider_value, input_text):
150
  print(f"speaker_id = {slider_value}")
151
  all_speech = []
152
  for sentence in input_text.split("."):
153
- sampling_rate_response, audio_chunk_response = tts_fn(slider_value, sentence)
154
- all_speech.append(audio_chunk_response)
 
155
 
156
  audio_response = np.concatenate(all_speech)
157
  return sampling_rate_response, audio_response
 
150
  print(f"speaker_id = {slider_value}")
151
  all_speech = []
152
  for sentence in input_text.split("."):
153
+ if sentence != '' and sentence != ' ' and sentence != '\n':
154
+ sampling_rate_response, audio_chunk_response = tts_fn(slider_value, sentence)
155
+ all_speech.append(audio_chunk_response)
156
 
157
  audio_response = np.concatenate(all_speech)
158
  return sampling_rate_response, audio_response