NoCrypt commited on
Commit
8acadec
1 Parent(s): 28d6785

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -79
app.py CHANGED
@@ -129,13 +129,6 @@ def tts(
129
  print(f"Model name: {model_name}")
130
  print(f"F0: {f0_method}, Key: {f0_up_key}, Index: {index_rate}, Protect: {protect}")
131
  try:
132
- if limitation and len(tts_text) > 280:
133
- print("Error: Text too long")
134
- return (
135
- f"Text characters should be at most 280 in this huggingface space, but got {len(tts_text)} characters.",
136
- None,
137
- None,
138
- )
139
  t0 = time.time()
140
  if speed >= 0:
141
  speed_str = f"+{speed}%"
@@ -217,19 +210,7 @@ rmvpe_model = RMVPE("rmvpe.pt", config.is_half, config.device)
217
  print("rmvpe model loaded.")
218
 
219
  initial_md = """
220
- # RVC text-to-speech demo
221
-
222
- This is a text-to-speech demo of RVC moe models of [rvc_okiba](https://huggingface.co/litagin/rvc_okiba) using [edge-tts](https://github.com/rany2/edge-tts).
223
-
224
- Input text ➡[(edge-tts)](https://github.com/rany2/edge-tts)➡ Speech mp3 file ➡[(RVC)](https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI)➡ Final output
225
-
226
- This runs on the 🤗 server's cpu, so it may be slow.
227
-
228
- Although the models are trained on Japanese voices and intended for Japanese text, they can also be used with other languages with the corresponding edge-tts speaker (but possibly with a Japanese accent).
229
-
230
- Input characters are limited to 280 characters, and the speech audio is limited to 20 seconds in this 🤗 space.
231
-
232
- [Visit this GitHub repo](https://github.com/litagin02/rvc-tts-webui) for running locally with your models and GPU!
233
  """
234
 
235
  app = gr.Blocks()
@@ -305,64 +286,5 @@ with app:
305
  ],
306
  [info_text, edge_tts_output, tts_output],
307
  )
308
- with gr.Row():
309
- examples = gr.Examples(
310
- examples_per_page=100,
311
- examples=[
312
- ["これは日本語テキストから音声への変換デモです。", "ja-JP-NanamiNeural-Female"],
313
- [
314
- "This is an English text to speech conversation demo.",
315
- "en-US-AriaNeural-Female",
316
- ],
317
- ["这是一个中文文本到语音的转换演示。", "zh-CN-XiaoxiaoNeural-Female"],
318
- ["한국어 텍스트에서 음성으로 변환하는 데모입니다.", "ko-KR-SunHiNeural-Female"],
319
- [
320
- "Il s'agit d'une démo de conversion du texte français à la parole.",
321
- "fr-FR-DeniseNeural-Female",
322
- ],
323
- [
324
- "Dies ist eine Demo zur Umwandlung von Deutsch in Sprache.",
325
- "de-DE-AmalaNeural-Female",
326
- ],
327
- [
328
- "Tämä on suomenkielinen tekstistä puheeksi -esittely.",
329
- "fi-FI-NooraNeural-Female",
330
- ],
331
- [
332
- "Это демонстрационный пример преобразования русского текста в речь.",
333
- "ru-RU-SvetlanaNeural-Female",
334
- ],
335
- [
336
- "Αυτή είναι μια επίδειξη μετατροπής ελληνικού κειμένου σε ομιλία.",
337
- "el-GR-AthinaNeural-Female",
338
- ],
339
- [
340
- "Esta es una demostración de conversión de texto a voz en español.",
341
- "es-ES-ElviraNeural-Female",
342
- ],
343
- [
344
- "Questa è una dimostrazione di sintesi vocale in italiano.",
345
- "it-IT-ElsaNeural-Female",
346
- ],
347
- [
348
- "Esta é uma demonstração de conversão de texto em fala em português.",
349
- "pt-PT-RaquelNeural-Female",
350
- ],
351
- [
352
- "Це демонстрація тексту до мовлення українською мовою.",
353
- "uk-UA-PolinaNeural-Female",
354
- ],
355
- [
356
- "هذا عرض توضيحي عربي لتحويل النص إلى كلام.",
357
- "ar-EG-SalmaNeural-Female",
358
- ],
359
- [
360
- "இது தமிழ் உரையிலிருந்து பேச்சு மாற்ற டெமோ.",
361
- "ta-IN-PallaviNeural-Female",
362
- ],
363
- ],
364
- inputs=[tts_text, tts_voice],
365
- )
366
-
367
 
368
  app.launch()
 
129
  print(f"Model name: {model_name}")
130
  print(f"F0: {f0_method}, Key: {f0_up_key}, Index: {index_rate}, Protect: {protect}")
131
  try:
 
 
 
 
 
 
 
132
  t0 = time.time()
133
  if speed >= 0:
134
  speed_str = f"+{speed}%"
 
210
  print("rmvpe model loaded.")
211
 
212
  initial_md = """
213
+ # Miku TTS
 
 
 
 
 
 
 
 
 
 
 
 
214
  """
215
 
216
  app = gr.Blocks()
 
286
  ],
287
  [info_text, edge_tts_output, tts_output],
288
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
 
290
  app.launch()