Hieucyber2208 commited on
Commit
55862dc
·
verified ·
1 Parent(s): 8d570cc

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
@@ -41,7 +41,7 @@ def generate_audio(text, filename="output.mp3", gender="female", speed="normal")
41
  else:
42
  print("⚠️ Giọng không hợp lệ! Chỉ hỗ trợ 'male' hoặc 'female'.")
43
  def text_to_speech(gender, speed):
44
- text_folder = "./text"
45
  text_files = sorted([f for f in os.listdir(text_folder) if f.endswith('.txt') and f != "text.txt"])
46
  for text_file in text_files:
47
  with open(f"./text/{text_file}", "r", encoding="utf-8") as file:
 
41
  else:
42
  print("⚠️ Giọng không hợp lệ! Chỉ hỗ trợ 'male' hoặc 'female'.")
43
  def text_to_speech(gender, speed):
44
+ text_folder = "./"
45
  text_files = sorted([f for f in os.listdir(text_folder) if f.endswith('.txt') and f != "text.txt"])
46
  for text_file in text_files:
47
  with open(f"./text/{text_file}", "r", encoding="utf-8") as file: