xJuuzouYTx commited on
Commit
1714f95
1 Parent(s): 265fb41

[FIX] remove tts lenght limit

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. tts/conversion.py +2 -4
app.py CHANGED
@@ -159,7 +159,7 @@ def update_tts_methods_voice(select_value):
159
  elif select_value == 'ElevenLabs':
160
  return gr.update(choices=ELEVENLABS_VOICES_NAMES), gr.Markdown.update(visible=True), gr.Textbox.update(visible=True), gr.Radio.update(visible=False)
161
  elif select_value == 'CoquiTTS':
162
- return gr.Dropdown(visible=False), gr.Markdown.update(visible=True), gr.Textbox.update(visible=False), gr.Radio.update(visible=True)
163
 
164
  with gr.Blocks() as app:
165
  gr.HTML("<h1> Simple RVC Inference - by Juuxn 💻 </h1>")
 
159
  elif select_value == 'ElevenLabs':
160
  return gr.update(choices=ELEVENLABS_VOICES_NAMES), gr.Markdown.update(visible=True), gr.Textbox.update(visible=True), gr.Radio.update(visible=False)
161
  elif select_value == 'CoquiTTS':
162
+ return gr.Dropdown(visible=False), gr.Markdown.update(visible=False), gr.Textbox.update(visible=False), gr.Radio.update(visible=True)
163
 
164
  with gr.Blocks() as app:
165
  gr.HTML("<h1> Simple RVC Inference - by Juuxn 💻 </h1>")
tts/conversion.py CHANGED
@@ -69,10 +69,8 @@ def tts_infer(tts_text, model_url, tts_method, tts_model, tts_api_key, language)
69
  if tts_method == "CoquiTTS":
70
  print(tts_text, language)
71
  # return output
72
- with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
73
- coquiTTS.get_tts(tts_text, fp, speaker = {"language" : language})
74
- converted_tts_filename = fp.name
75
- success = True
76
 
77
  if tts_method == 'ElevenLabs':
78
  try:
 
69
  if tts_method == "CoquiTTS":
70
  print(tts_text, language)
71
  # return output
72
+ coquiTTS.get_tts(tts_text, converted_tts_filename, speaker = {"language" : language})
73
+ success = True
 
 
74
 
75
  if tts_method == 'ElevenLabs':
76
  try: