Jerich commited on
Commit
150f666
·
verified ·
1 Parent(s): 06e8ec6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -373,7 +373,7 @@ async def translate_text(text: str = Form(...), source_lang: str = Form(...), ta
373
  output_path, error = synthesize_speech(translated_text, target_code)
374
  if output_path:
375
  output_filename = os.path.basename(output_path)
376
- output_audio_url = f"https://jerich-talklasapp.hf.space/audio_output/{output_filename}"
377
  logger.info("TTS conversion completed")
378
  except Exception as e:
379
  logger.error(f"Error during TTS conversion: {str(e)}")
@@ -506,7 +506,7 @@ async def translate_audio(audio: UploadFile = File(...), source_lang: str = Form
506
  output_path, error = synthesize_speech(translated_text, target_code)
507
  if output_path:
508
  output_filename = os.path.basename(output_path)
509
- output_audio_url = f"https://jerich-talklasapp.hf.space/audio_output/{output_filename}"
510
  logger.info("TTS conversion completed")
511
  except Exception as e:
512
  logger.error(f"Error during TTS conversion: {str(e)}")
@@ -556,7 +556,7 @@ async def text_to_speech(text: str = Form(...), target_lang: str = Form(...)):
556
  output_path, error = synthesize_speech(text, target_code)
557
  if output_path:
558
  output_filename = os.path.basename(output_path)
559
- output_audio_url = f"https://jerich-talklasapp.hf.space/audio_output/{output_filename}"
560
  logger.info("TTS conversion completed")
561
  else:
562
  logger.error(f"TTS conversion failed: {error}")
 
373
  output_path, error = synthesize_speech(translated_text, target_code)
374
  if output_path:
375
  output_filename = os.path.basename(output_path)
376
+ output_audio_url = f"https://jerich-talklasapp2.hf.space/audio_output/{output_filename}"
377
  logger.info("TTS conversion completed")
378
  except Exception as e:
379
  logger.error(f"Error during TTS conversion: {str(e)}")
 
506
  output_path, error = synthesize_speech(translated_text, target_code)
507
  if output_path:
508
  output_filename = os.path.basename(output_path)
509
+ output_audio_url = f"https://jerich-talklasapp2.hf.space/audio_output/{output_filename}"
510
  logger.info("TTS conversion completed")
511
  except Exception as e:
512
  logger.error(f"Error during TTS conversion: {str(e)}")
 
556
  output_path, error = synthesize_speech(text, target_code)
557
  if output_path:
558
  output_filename = os.path.basename(output_path)
559
+ output_audio_url = f"https://jerich-talklasapp2.hf.space/audio_output/{output_filename}"
560
  logger.info("TTS conversion completed")
561
  else:
562
  logger.error(f"TTS conversion failed: {error}")