Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ import os
|
|
39 |
from TTS.utils.manage import get_user_data_dir
|
40 |
|
41 |
# Autenticación con la API de Hugging Face
|
42 |
-
repo_id = "Blakus/
|
43 |
local_dir = os.path.join(get_user_data_dir("tts"), "tts_models--multilingual--multi-dataset--xtts_v2")
|
44 |
|
45 |
# Crear el directorio si no existe
|
@@ -288,6 +288,7 @@ def predict(
|
|
288 |
repetition_penalty=7.0,
|
289 |
temperature=0.85,
|
290 |
)
|
|
|
291 |
first_chunk = True
|
292 |
for i, chunk in enumerate(chunks):
|
293 |
if first_chunk:
|
@@ -303,11 +304,13 @@ def predict(
|
|
303 |
#metrics_text += (
|
304 |
# f"Time to generate audio: {round(inference_time*1000)} milliseconds\n"
|
305 |
#)
|
|
|
306 |
wav = torch.cat(wav_chunks, dim=0)
|
307 |
print(wav.shape)
|
308 |
real_time_factor = (time.time() - t0) / wav.shape[0] * 24000
|
309 |
print(f"Real-time factor (RTF): {real_time_factor}")
|
310 |
metrics_text += f"Real-time factor (RTF): {real_time_factor:.2f}\n"
|
|
|
311 |
torchaudio.save("output.wav", wav.squeeze().unsqueeze(0).cpu(), 24000)
|
312 |
"""
|
313 |
|
@@ -412,21 +415,29 @@ def predict(
|
|
412 |
title = "Coqui🐸 XTTS"
|
413 |
|
414 |
description = """
|
|
|
415 |
<br/>
|
|
|
416 |
This demo is currently running **XTTS v2.0.3** <a href="https://huggingface.co/coqui/XTTS-v2">XTTS</a> is a multilingual text-to-speech and voice-cloning model. This demo features zero-shot voice cloning, however, you can fine-tune XTTS for better results. Leave a star 🌟 on Github <a href="https://github.com/coqui-ai/TTS">🐸TTS</a>, where our open-source inference and training code lives.
|
|
|
417 |
<br/>
|
|
|
418 |
Supported languages: Arabic: ar, Brazilian Portuguese: pt , Mandarin Chinese: zh-cn, Czech: cs, Dutch: nl, English: en, French: fr, German: de, Italian: it, Polish: pl, Russian: ru, Spanish: es, Turkish: tr, Japanese: ja, Korean: ko, Hungarian: hu, Hindi: hi
|
|
|
419 |
<br/>
|
420 |
"""
|
421 |
|
422 |
links = """
|
423 |
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=0d00920c-8cc9-4bf3-90f2-a615797e5f59" />
|
|
|
424 |
| | |
|
425 |
| ------------------------------- | --------------------------------------- |
|
426 |
| 🐸💬 **CoquiTTS** | <a style="display:inline-block" href='https://github.com/coqui-ai/TTS'><img src='https://img.shields.io/github/stars/coqui-ai/TTS?style=social' /></a>|
|
427 |
| 💼 **Documentation** | [ReadTheDocs](https://tts.readthedocs.io/en/latest/)
|
428 |
| 👩💻 **Questions** | [GitHub Discussions](https://github.com/coqui-ai/TTS/discussions) |
|
429 |
| 🗯 **Community** | [![Dicord](https://img.shields.io/discord/1037326658807533628?color=%239B59B6&label=chat%20on%20discord)](https://discord.gg/5eXr5seRrv) |
|
|
|
|
|
430 |
"""
|
431 |
|
432 |
article = """
|
|
|
39 |
from TTS.utils.manage import get_user_data_dir
|
40 |
|
41 |
# Autenticación con la API de Hugging Face
|
42 |
+
repo_id = "Blakus/XTTS_custom"
|
43 |
local_dir = os.path.join(get_user_data_dir("tts"), "tts_models--multilingual--multi-dataset--xtts_v2")
|
44 |
|
45 |
# Crear el directorio si no existe
|
|
|
288 |
repetition_penalty=7.0,
|
289 |
temperature=0.85,
|
290 |
)
|
291 |
+
|
292 |
first_chunk = True
|
293 |
for i, chunk in enumerate(chunks):
|
294 |
if first_chunk:
|
|
|
304 |
#metrics_text += (
|
305 |
# f"Time to generate audio: {round(inference_time*1000)} milliseconds\n"
|
306 |
#)
|
307 |
+
|
308 |
wav = torch.cat(wav_chunks, dim=0)
|
309 |
print(wav.shape)
|
310 |
real_time_factor = (time.time() - t0) / wav.shape[0] * 24000
|
311 |
print(f"Real-time factor (RTF): {real_time_factor}")
|
312 |
metrics_text += f"Real-time factor (RTF): {real_time_factor:.2f}\n"
|
313 |
+
|
314 |
torchaudio.save("output.wav", wav.squeeze().unsqueeze(0).cpu(), 24000)
|
315 |
"""
|
316 |
|
|
|
415 |
title = "Coqui🐸 XTTS"
|
416 |
|
417 |
description = """
|
418 |
+
|
419 |
<br/>
|
420 |
+
|
421 |
This demo is currently running **XTTS v2.0.3** <a href="https://huggingface.co/coqui/XTTS-v2">XTTS</a> is a multilingual text-to-speech and voice-cloning model. This demo features zero-shot voice cloning, however, you can fine-tune XTTS for better results. Leave a star 🌟 on Github <a href="https://github.com/coqui-ai/TTS">🐸TTS</a>, where our open-source inference and training code lives.
|
422 |
+
|
423 |
<br/>
|
424 |
+
|
425 |
Supported languages: Arabic: ar, Brazilian Portuguese: pt , Mandarin Chinese: zh-cn, Czech: cs, Dutch: nl, English: en, French: fr, German: de, Italian: it, Polish: pl, Russian: ru, Spanish: es, Turkish: tr, Japanese: ja, Korean: ko, Hungarian: hu, Hindi: hi
|
426 |
+
|
427 |
<br/>
|
428 |
"""
|
429 |
|
430 |
links = """
|
431 |
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=0d00920c-8cc9-4bf3-90f2-a615797e5f59" />
|
432 |
+
|
433 |
| | |
|
434 |
| ------------------------------- | --------------------------------------- |
|
435 |
| 🐸💬 **CoquiTTS** | <a style="display:inline-block" href='https://github.com/coqui-ai/TTS'><img src='https://img.shields.io/github/stars/coqui-ai/TTS?style=social' /></a>|
|
436 |
| 💼 **Documentation** | [ReadTheDocs](https://tts.readthedocs.io/en/latest/)
|
437 |
| 👩💻 **Questions** | [GitHub Discussions](https://github.com/coqui-ai/TTS/discussions) |
|
438 |
| 🗯 **Community** | [![Dicord](https://img.shields.io/discord/1037326658807533628?color=%239B59B6&label=chat%20on%20discord)](https://discord.gg/5eXr5seRrv) |
|
439 |
+
|
440 |
+
|
441 |
"""
|
442 |
|
443 |
article = """
|