HirCoir commited on
Commit
2bb9c7e
1 Parent(s): e5aa50a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,7 +23,7 @@ def convert_text_to_speech(parrafo, model):
23
  random_name = ''.join(random.choices(string.ascii_letters + string.digits, k=8)) + '.wav'
24
  output_file = os.path.join(file_folder, random_name)
25
  app.logger.info("Audio file created at: %s", output_file)
26
- piper_exe = os.path.join(file_folder, 'home', 'app', 'piper')
27
 
28
  if os.path.isfile(piper_exe):
29
  comando = f'echo {parrafo_filtrado} | "{piper_exe}" -m {model} -f {output_file}'
@@ -34,7 +34,7 @@ def convert_text_to_speech(parrafo, model):
34
 
35
  @app.route('/')
36
  def index():
37
- model_folder = os.path.join(file_folder)
38
  model_options = [file for file in os.listdir(model_folder) if file.endswith('.onnx')]
39
  # Log the contents of the current folder
40
  app.logger.info("Contents of current folder: %s", os.listdir(file_folder))
 
23
  random_name = ''.join(random.choices(string.ascii_letters + string.digits, k=8)) + '.wav'
24
  output_file = os.path.join(file_folder, random_name)
25
  app.logger.info("Audio file created at: %s", output_file)
26
+ piper_exe = os.path.join(file_folder, 'piper') # Adjusted the path for piper
27
 
28
  if os.path.isfile(piper_exe):
29
  comando = f'echo {parrafo_filtrado} | "{piper_exe}" -m {model} -f {output_file}'
 
34
 
35
  @app.route('/')
36
  def index():
37
+ model_folder = file_folder # Adjusted the model folder to file_folder
38
  model_options = [file for file in os.listdir(model_folder) if file.endswith('.onnx')]
39
  # Log the contents of the current folder
40
  app.logger.info("Contents of current folder: %s", os.listdir(file_folder))