Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mejoras en la instalación de voces personalizadas (piper) #24

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TTS/list_voices.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def extract_tar(file, destination):
def install_piper_voice(config, reader):
abrir_tar = wx.FileDialog(None, _("Selecciona un paquete de voz"), wildcard=_("Archivos tar.gz (*.tar.gz)|*.tar.gz"), style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST)
if abrir_tar.ShowModal() == wx.ID_CANCEL:
wx.MessageBox(_('Para usar piper como sistema TTS, necesitas tener al menos una voz. Si quieres hacerlo de forma manual, extrae el paquete de voz en la carpeta "piper/voices/voice-nombre_de_paquete" en VeTube.'), _("No se instaló ninguna voz"), wx.ICON_ERROR)
return
wx.MessageBox(_('Para usar piper como sistema TTS, necesitas tener al menos una voz. Puedes hacerlo en la configuración más adelante. Mientras tanto, se volverá el motor de texto a voz al predeterminado para los mensajes.'), _("No se instaló ninguna voz"), wx.ICON_ERROR)
return False
paquete = abrir_tar.GetPath()
nombre_paquete = os.path.splitext(os.path.basename(paquete))[0]
destino = os.path.join(os.getcwd(), "piper", "voices", nombre_paquete[:-3])
Expand Down
5 changes: 4 additions & 1 deletion ui/vetube.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ def configurar_piper(carpeta_voces):
if onnx_models is None:
if dialog_response.response(_('Necesitas al menos una voz para poder usar el sintetizador Piper. ¿Quieres abrir nuestra carpeta de Drive para descargar algunos modelos? Si pulsas sí, se abrirá nuestra carpeta seguido de una ventana para instalar una una vez la descargues.'), _("No hay voces instaladas"),wx.YES_NO | wx.ICON_ASTERISK) == wx.ID_YES:
wx.LaunchDefaultBrowser("https://drive.google.com/drive/folders/1zFJRTI6CpVw9NkrTiNYOKGga0yn4JXzv?usp=drive_link")
config, reader._lector = install_piper_voice(config, reader._lector)
try:
config, reader._lector = install_piper_voice(config, reader._lector)
except TypeError:
config["sistemaTTS"] = "auto"
elif isinstance(onnx_models, str) or isinstance(onnx_models, list): config['voz'] = 0
carpeta_voces = path.join(getcwd(), "piper", "voices")
pos=[]
Expand Down
Loading