DevangMahesh commited on
Commit
f2ca9d0
·
1 Parent(s): a83e4c6

Hoping this will add pause

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -231,9 +231,9 @@ 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"\*[^*]+\*", " ", text)
235
  text = re.sub(r'[^A-Za-z0-9.,$ \'?]+', " ", text)
236
- text = re.sub(r'\n', ". ", text) #To add pause need to add period and not space
237
  text = text.encode('cp1252', 'ignore').decode('cp1252')
238
  if text.isspace() or text == "":
239
  return None
 
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)
 
237
  text = text.encode('cp1252', 'ignore').decode('cp1252')
238
  if text.isspace() or text == "":
239
  return None