DevangMahesh commited on
Commit
53320ef
·
1 Parent(s): fe42433
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -231,6 +231,7 @@ def transcribe_audio(audio_path: str) -> str:
231
 
232
  def convert_text_to_mp3(text, mp3_name = '/tmp/amy_said.mp3'):
233
  text = re.sub(r':', ". ", text) #To add pause need to add period and not space
 
234
  text = re.sub(r'\n', ". ", text) #To add pause need to add period and not space
235
  text = re.sub(r"\*[^*]+\*", " ", text)
236
  text = re.sub(r'[^A-Za-z0-9.,$ \'?]+', " ", text)
 
231
 
232
  def convert_text_to_mp3(text, mp3_name = '/tmp/amy_said.mp3'):
233
  text = re.sub(r':', ". ", text) #To add pause need to add period and not space
234
+ text = re.sub(r'!', ". ", text) #To add pause need to add period and not space
235
  text = re.sub(r'\n', ". ", text) #To add pause need to add period and not space
236
  text = re.sub(r"\*[^*]+\*", " ", text)
237
  text = re.sub(r'[^A-Za-z0-9.,$ \'?]+', " ", text)