Hieucyber2208 commited on
Commit
5d91eed
·
verified ·
1 Parent(s): 5839c6b

Update src/text_to_speech.py

Browse files
Files changed (1) hide show
  1. src/text_to_speech.py +1 -1
src/text_to_speech.py CHANGED
@@ -46,7 +46,7 @@ def text_to_speech(gender, speed):
46
  for text_file in text_files:
47
  with open(f"./text/{text_file}", "r", encoding="utf-8") as file:
48
  content = file.read()
49
- audio_file = text_file.replace("txt","wav")
50
  generate_audio(content, f"./audio/{audio_file}", gender=gender, speed=speed)
51
  if __name__ == "__main__":
52
  text_to_speech(gender = "female", speed = "fast")
 
46
  for text_file in text_files:
47
  with open(f"./text/{text_file}", "r", encoding="utf-8") as file:
48
  content = file.read()
49
+ audio_file = text_file.replace("txt","mp3")
50
  generate_audio(content, f"./audio/{audio_file}", gender=gender, speed=speed)
51
  if __name__ == "__main__":
52
  text_to_speech(gender = "female", speed = "fast")