Upload 14 files
Browse files- .gitattributes +4 -0
- ENVIRONMENT +86 -0
- app.py +141 -0
- examples/.DS_Store +0 -0
- examples/Margaux_1.wav +0 -0
- examples/Margaux_2.wav +3 -0
- examples/Margaux_3.wav +3 -0
- examples/Margaux_4.wav +3 -0
- examples/Margaux_5.wav +3 -0
- icon.png +0 -0
- install.json +102 -0
- pinokio.js +42 -0
- pinokio_meta.json +5 -0
- requirements.txt +64 -0
- start.json +56 -0
.gitattributes
CHANGED
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
examples/Margaux_2.wav filter=lfs diff=lfs merge=lfs -text
|
37 |
+
examples/Margaux_3.wav filter=lfs diff=lfs merge=lfs -text
|
38 |
+
examples/Margaux_4.wav filter=lfs diff=lfs merge=lfs -text
|
39 |
+
examples/Margaux_5.wav filter=lfs diff=lfs merge=lfs -text
|
ENVIRONMENT
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
##########################################################################
|
3 |
+
#
|
4 |
+
# PINOKIO_SHARE_CLOUDFLARE
|
5 |
+
# Set this variable to share the app publicly via cloudflare tunnel.
|
6 |
+
#
|
7 |
+
##########################################################################
|
8 |
+
PINOKIO_SHARE_CLOUDFLARE=false
|
9 |
+
|
10 |
+
##########################################################################
|
11 |
+
#
|
12 |
+
# PINOKIO_SHARE_PASSCODE
|
13 |
+
#
|
14 |
+
# By default, your publicly shared app will be 100% open to anyone
|
15 |
+
# with the link via Cloudflare.
|
16 |
+
#
|
17 |
+
# You can add authorization by protecting it with a passcode.
|
18 |
+
# Set this value, and any access to the app will require a pass code input
|
19 |
+
#
|
20 |
+
##########################################################################
|
21 |
+
PINOKIO_SHARE_PASSCODE=
|
22 |
+
|
23 |
+
##########################################################################
|
24 |
+
#
|
25 |
+
# PINOKIO_SCRIPT_DEFAULT
|
26 |
+
# If this variable is false, 'default': true menu items in pinokio.js
|
27 |
+
# will NOT automatically run
|
28 |
+
#
|
29 |
+
##########################################################################
|
30 |
+
PINOKIO_SCRIPT_DEFAULT=true
|
31 |
+
|
32 |
+
##########################################################################
|
33 |
+
#
|
34 |
+
# GRADIO_TEMP_DIR
|
35 |
+
# All the files uploaded through gradio goes here.
|
36 |
+
#
|
37 |
+
# Delete this line to store the files under PINOKIO_HOME/cache/GRADIO_TEMPDIR
|
38 |
+
# or change the path if you want to use a different path
|
39 |
+
#
|
40 |
+
##########################################################################
|
41 |
+
GRADIO_TEMP_DIR=./cache/GRADIO_TEMP_DIR
|
42 |
+
|
43 |
+
##########################################################################
|
44 |
+
#
|
45 |
+
# HF_HOME
|
46 |
+
#
|
47 |
+
# Huggingface cache
|
48 |
+
# All the model files automatically downloaded through libraries like
|
49 |
+
# diffusers, transformers, etc. will be stored under this path
|
50 |
+
#
|
51 |
+
# You can save disk space by deleting this line, which will store all
|
52 |
+
# huggingface files under PINOKIO_HOME/cache/HF_HOME without redundancy.
|
53 |
+
#
|
54 |
+
##########################################################################
|
55 |
+
HF_HOME=./cache/HF_HOME
|
56 |
+
|
57 |
+
##########################################################################
|
58 |
+
#
|
59 |
+
# TORCH_HOME
|
60 |
+
#
|
61 |
+
# Torch hub cache
|
62 |
+
# All the files automatically downloaded by pytorch will be stored here
|
63 |
+
#
|
64 |
+
# You can save disk space by deleting this line, which will store all
|
65 |
+
# torch hub files under PINOKIO_HOME/cache/TORCH_HOME without redundancy.
|
66 |
+
#
|
67 |
+
##########################################################################
|
68 |
+
TORCH_HOME=./cache/TORCH_HOME
|
69 |
+
|
70 |
+
##########################################################################
|
71 |
+
#
|
72 |
+
# PINOKIO_SHARE_LOCAL
|
73 |
+
# Set this variable to true to share the app on the local network.
|
74 |
+
#
|
75 |
+
##########################################################################
|
76 |
+
PINOKIO_SHARE_LOCAL=false
|
77 |
+
|
78 |
+
##########################################################################
|
79 |
+
#
|
80 |
+
# PINOKIO_SHARE_LOCAL_PORT
|
81 |
+
# Set this variable to use fixed port for the local network sharing feature
|
82 |
+
# If not specified, a random port will be assigned to the local proxy used
|
83 |
+
# for local sharing.
|
84 |
+
#
|
85 |
+
##########################################################################
|
86 |
+
PINOKIO_SHARE_LOCAL_PORT=
|
app.py
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from TTS.api import TTS
|
3 |
+
import os
|
4 |
+
import time
|
5 |
+
import torch
|
6 |
+
from torch.serialization import add_safe_globals
|
7 |
+
from TTS.tts.configs.xtts_config import XttsConfig
|
8 |
+
|
9 |
+
# Ajouter XttsConfig comme "safe global" pour éviter les erreurs de désérialisation
|
10 |
+
add_safe_globals([XttsConfig])
|
11 |
+
|
12 |
+
# Charger le modèle XTTS
|
13 |
+
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=False)
|
14 |
+
|
15 |
+
# Créer le dossier de sortie
|
16 |
+
output_folder = "output_audio"
|
17 |
+
os.makedirs(output_folder, exist_ok=True)
|
18 |
+
|
19 |
+
def predict(prompt, speaker, agree, subfolder_name, file_name):
|
20 |
+
if not agree:
|
21 |
+
raise gr.Error("Veuillez accepter les conditions d'utilisation.")
|
22 |
+
|
23 |
+
# Utiliser le nom fourni pour le sous-dossier ou en générer un par défaut
|
24 |
+
subfolder_name = subfolder_name.strip() or f"session_{int(time.time())}"
|
25 |
+
session_folder = os.path.join(output_folder, subfolder_name)
|
26 |
+
os.makedirs(session_folder, exist_ok=True)
|
27 |
+
|
28 |
+
# Utiliser le nom fourni pour le fichier ou un nom par défaut
|
29 |
+
file_name = file_name.strip() or "output.wav"
|
30 |
+
if not file_name.endswith(".wav"):
|
31 |
+
file_name += ".wav"
|
32 |
+
|
33 |
+
output_path = os.path.join(session_folder, file_name)
|
34 |
+
|
35 |
+
# Charger tous les fichiers WAV du speaker sélectionné
|
36 |
+
speaker_wav_paths = [os.path.join("examples", f) for f in os.listdir("examples") if f.startswith(speaker) and f.endswith(".wav")]
|
37 |
+
|
38 |
+
if not speaker_wav_paths:
|
39 |
+
raise gr.Error(f"Aucun fichier audio trouvé pour le speaker : {speaker}")
|
40 |
+
|
41 |
+
# Synthèse vocale
|
42 |
+
tts.tts_to_file(
|
43 |
+
text=prompt,
|
44 |
+
file_path=output_path,
|
45 |
+
speaker_wav=speaker_wav_paths, # Liste de fichiers .wav
|
46 |
+
language="fr",
|
47 |
+
split_sentences=False # Désactiver si le texte est court
|
48 |
+
)
|
49 |
+
|
50 |
+
# Générer une forme d'onde à partir de l'audio
|
51 |
+
waveform = gr.make_waveform(audio=output_path)
|
52 |
+
|
53 |
+
return 100, waveform, output_path
|
54 |
+
|
55 |
+
# Interface utilisateur
|
56 |
+
custom_css = """
|
57 |
+
.gradio-container {
|
58 |
+
font-family: 'Arial', sans-serif;
|
59 |
+
background-color: #f0f4f8;
|
60 |
+
}
|
61 |
+
.gr-form {
|
62 |
+
background-color: white;
|
63 |
+
border-radius: 10px;
|
64 |
+
padding: 20px;
|
65 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
66 |
+
}
|
67 |
+
.gr-button {
|
68 |
+
background-color: #4a90e2;
|
69 |
+
border: none;
|
70 |
+
}
|
71 |
+
.gr-button:hover {
|
72 |
+
background-color: #3a7bc8;
|
73 |
+
}
|
74 |
+
"""
|
75 |
+
|
76 |
+
title = "Synthèse Vocale XTTS 🎙️"
|
77 |
+
|
78 |
+
description = """
|
79 |
+
<h3>Bienvenue sur notre outil de synthèse vocale XTTS !</h3>
|
80 |
+
<p>Cet outil vous permet de générer une voix naturelle à partir d'un texte en français.
|
81 |
+
Choisissez une voix, entrez votre texte, et écoutez le résultat !</p>
|
82 |
+
"""
|
83 |
+
|
84 |
+
article = """
|
85 |
+
<div style='margin:20px auto; text-align: center;'>
|
86 |
+
<p>En utilisant cette démo, vous acceptez les conditions d'utilisation du modèle Coqui Public disponibles sur
|
87 |
+
<a href='https://coqui.ai/cpml' target='_blank'>https://coqui.ai/cpml</a></p>
|
88 |
+
</div>
|
89 |
+
"""
|
90 |
+
|
91 |
+
# Générer la liste des speakers à partir des fichiers WAV dans le dossier examples
|
92 |
+
available_speakers = list(set([f.split('_')[0] for f in os.listdir("examples") if f.endswith(".wav")]))
|
93 |
+
|
94 |
+
with gr.Blocks(css=custom_css) as demo:
|
95 |
+
gr.Markdown(f"<h1 style='text-align: center;'>{title}</h1>")
|
96 |
+
gr.Markdown(description)
|
97 |
+
|
98 |
+
with gr.Row():
|
99 |
+
with gr.Column(scale=2):
|
100 |
+
prompt = gr.Textbox(
|
101 |
+
label="Texte pour la synthèse vocale",
|
102 |
+
info="Une ou deux phrases à la fois sont préférables* (max : 10)",
|
103 |
+
placeholder="Bonjour ! Comment allez-vous aujourd'hui ?",
|
104 |
+
lines=10
|
105 |
+
)
|
106 |
+
with gr.Column(scale=1):
|
107 |
+
speaker = gr.Dropdown(
|
108 |
+
label="Voix",
|
109 |
+
choices=available_speakers,
|
110 |
+
value=available_speakers[0] if available_speakers else None
|
111 |
+
)
|
112 |
+
agree = gr.Checkbox(
|
113 |
+
label="J'accepte les conditions d'utilisation",
|
114 |
+
value=True
|
115 |
+
)
|
116 |
+
subfolder_name = gr.Textbox(
|
117 |
+
label="Nom du sous-dossier (facultatif)",
|
118 |
+
placeholder="Nom du sous-dossier pour stocker l'audio"
|
119 |
+
)
|
120 |
+
file_name = gr.Textbox(
|
121 |
+
label="Nom du fichier (facultatif)",
|
122 |
+
placeholder="Nom du fichier audio généré"
|
123 |
+
)
|
124 |
+
|
125 |
+
generate_btn = gr.Button("Générer la voix", variant="primary")
|
126 |
+
|
127 |
+
progress = gr.Progress()
|
128 |
+
|
129 |
+
with gr.Row():
|
130 |
+
audio_output = gr.Audio(label="Audio généré")
|
131 |
+
waveform_output = gr.Video(label="Forme d'onde")
|
132 |
+
|
133 |
+
generate_btn.click(
|
134 |
+
predict,
|
135 |
+
inputs=[prompt, speaker, agree, subfolder_name, file_name],
|
136 |
+
outputs=[progress, waveform_output, audio_output]
|
137 |
+
)
|
138 |
+
|
139 |
+
gr.Markdown(article)
|
140 |
+
|
141 |
+
demo.launch(debug=True)
|
examples/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
examples/Margaux_1.wav
ADDED
Binary file (613 kB). View file
|
|
examples/Margaux_2.wav
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:51f82935d88f9fdcec26baffa68f927a4843ac27079974f2e56e6e042e200cdb
|
3 |
+
size 2359340
|
examples/Margaux_3.wav
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9cc08907b9bab49613684a6bb0ef74a92c4e2532f8558935bdf665e5740e3ad7
|
3 |
+
size 1645100
|
examples/Margaux_4.wav
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4e3e9c1ef37a03722ded40e63737768da83e6cf132651a8fec3aa3f978604a77
|
3 |
+
size 1776428
|
examples/Margaux_5.wav
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e71da4c85c5762a4c2e9033ef628d1e45ab32fa7ce9f267d1b1ed299a70bc898
|
3 |
+
size 1702700
|
icon.png
ADDED
install.json
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"requires": [
|
3 |
+
{ "type": "conda", "name": "ffmpeg", "args": "-c conda-forge" },
|
4 |
+
{ "platform": "darwin", "name": "brew" },
|
5 |
+
{ "platform": "darwin", "type": "brew", "name": "mecab" }
|
6 |
+
],
|
7 |
+
"run": [
|
8 |
+
{
|
9 |
+
"method": "shell.run",
|
10 |
+
"params": {
|
11 |
+
"message": "{{os.platform() === 'win32' ? '' : 'brew install mecab'}}"
|
12 |
+
}
|
13 |
+
},
|
14 |
+
{
|
15 |
+
"method": "shell.run",
|
16 |
+
"params": {
|
17 |
+
"message": "{{os.platform() === 'win32' ? 'python' : 'python3'}} -m venv env"
|
18 |
+
}
|
19 |
+
},
|
20 |
+
{
|
21 |
+
"method": "shell.start",
|
22 |
+
"params": {
|
23 |
+
"env": {
|
24 |
+
"HF_HOME": "./huggingface"
|
25 |
+
}
|
26 |
+
}
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"method": "shell.enter",
|
30 |
+
"params": {
|
31 |
+
"message": "{{os.platform() === 'win32' ? 'env\\\\Scripts\\\\activate env' : 'source env/bin/activate env'}}",
|
32 |
+
"on": [
|
33 |
+
{
|
34 |
+
"event": null,
|
35 |
+
"return": true
|
36 |
+
}
|
37 |
+
]
|
38 |
+
}
|
39 |
+
},
|
40 |
+
{
|
41 |
+
"method": "shell.enter",
|
42 |
+
"params": {
|
43 |
+
"message": "npx --yes torchcraft@0.0.14",
|
44 |
+
"on": [
|
45 |
+
{
|
46 |
+
"event": null,
|
47 |
+
"return": true
|
48 |
+
}
|
49 |
+
]
|
50 |
+
}
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"method": "shell.enter",
|
54 |
+
"params": {
|
55 |
+
"message": "pip install -r torchcraft.txt",
|
56 |
+
"on": [
|
57 |
+
{
|
58 |
+
"event": null,
|
59 |
+
"return": true
|
60 |
+
}
|
61 |
+
]
|
62 |
+
}
|
63 |
+
},
|
64 |
+
{
|
65 |
+
"method": "shell.enter",
|
66 |
+
"params": {
|
67 |
+
"message": "pip install gradio==3.50.2",
|
68 |
+
"on": [
|
69 |
+
{
|
70 |
+
"event": null,
|
71 |
+
"return": true
|
72 |
+
}
|
73 |
+
]
|
74 |
+
}
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"method": "shell.enter",
|
78 |
+
"params": {
|
79 |
+
"message": "pip install -r requirements.txt",
|
80 |
+
"on": [
|
81 |
+
{
|
82 |
+
"event": null,
|
83 |
+
"return": true
|
84 |
+
}
|
85 |
+
]
|
86 |
+
}
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"method": "input",
|
90 |
+
"params": {
|
91 |
+
"title": "Install Success",
|
92 |
+
"description": "Go back to the dashboard and launch the app!"
|
93 |
+
}
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"method": "browser.open",
|
97 |
+
"params": {
|
98 |
+
"uri": "/?selected=XTTS"
|
99 |
+
}
|
100 |
+
}
|
101 |
+
]
|
102 |
+
}
|
pinokio.js
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const os = require('os')
|
2 |
+
const fs = require('fs')
|
3 |
+
const path = require("path")
|
4 |
+
const exists = (filepath) => {
|
5 |
+
return new Promise(r=>fs.access(filepath, fs.constants.F_OK, e => r(!e)))
|
6 |
+
}
|
7 |
+
module.exports = {
|
8 |
+
title: "XTTS",
|
9 |
+
description: "clone voices into different languages by using just a quick 3-second audio clip. (a local version of https://huggingface.co/spaces/coqui/xtts)",
|
10 |
+
icon: "icon.png",
|
11 |
+
menu: async (kernel) => {
|
12 |
+
let installed = await exists(path.resolve(__dirname, "env"))
|
13 |
+
if (installed) {
|
14 |
+
let session = (await kernel.loader.load(path.resolve(__dirname, "session.json"))).resolved
|
15 |
+
return [{
|
16 |
+
when: "start.json",
|
17 |
+
on: "<i class='fa-solid fa-spin fa-circle-notch'></i> Running",
|
18 |
+
type: "label",
|
19 |
+
href: "start.json"
|
20 |
+
}, {
|
21 |
+
when: "start.json",
|
22 |
+
off: "<i class='fa-solid fa-power-off'></i> Launch",
|
23 |
+
href: "start.json?fullscreen=true&run=true",
|
24 |
+
}, {
|
25 |
+
when: "start.json",
|
26 |
+
on: (session && session.url ? "<i class='fa-solid fa-rocket'></i> Open Web UI" : null),
|
27 |
+
href: (session && session.url ? session.url : null),
|
28 |
+
target: "_blank"
|
29 |
+
}, {
|
30 |
+
when: "start.json",
|
31 |
+
on: "<i class='fa-solid fa-desktop'></i> Server",
|
32 |
+
href: "start.json?fullscreen=true"
|
33 |
+
}]
|
34 |
+
} else {
|
35 |
+
return [{
|
36 |
+
html: '<i class="fa-solid fa-plug"></i> Install',
|
37 |
+
type: "link",
|
38 |
+
href: "install.json?run=true&fullscreen=true"
|
39 |
+
}]
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
pinokio_meta.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"posts": [
|
3 |
+
"https://x.com/cocktailpeanut/status/1702759980263162098"
|
4 |
+
]
|
5 |
+
}
|
requirements.txt
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Bibliothèque TTS
|
2 |
+
git+https://github.com/cocktailpeanut/TTS#egg=TTS
|
3 |
+
|
4 |
+
# PyTorch (compatible CPU et GPU)
|
5 |
+
torch>=2.1
|
6 |
+
torchaudio>=2.1
|
7 |
+
|
8 |
+
# Librairies scientifiques
|
9 |
+
numpy==1.22.0;python_version<="3.10"
|
10 |
+
numpy>=1.24.3;python_version>"3.10"
|
11 |
+
scipy>=1.11.2
|
12 |
+
librosa>=0.10.0
|
13 |
+
soundfile>=0.12.0
|
14 |
+
scikit-learn>=1.3.0
|
15 |
+
|
16 |
+
# Accélération des calculs
|
17 |
+
numba==0.55.1;python_version<"3.9"
|
18 |
+
numba>=0.57.0;python_version>="3.9"
|
19 |
+
|
20 |
+
# Gestion des langues et NLP
|
21 |
+
unidecode>=1.3.2
|
22 |
+
num2words
|
23 |
+
transformers>=4.33.0
|
24 |
+
spacy[ja]>=3
|
25 |
+
jieba
|
26 |
+
pypinyin
|
27 |
+
hangul_romanize
|
28 |
+
jamo
|
29 |
+
nltk
|
30 |
+
g2pkk>=0.1.1
|
31 |
+
|
32 |
+
# Gradio pour l'interface utilisateur
|
33 |
+
gradio>=3.4
|
34 |
+
|
35 |
+
# Configuration et gestion des fichiers
|
36 |
+
fsspec>=2023.6.0
|
37 |
+
pyyaml>=6.0
|
38 |
+
packaging>=23.1
|
39 |
+
aiohttp>=3.8.1
|
40 |
+
|
41 |
+
# Visualisation et notebooks
|
42 |
+
matplotlib>=3.7.0
|
43 |
+
pandas>=1.4,<2.0
|
44 |
+
umap-learn>=0.5.1
|
45 |
+
|
46 |
+
# Frameworks supplémentaires (Bark et Tortoise)
|
47 |
+
encodec>=0.1.1
|
48 |
+
einops>=0.6.0
|
49 |
+
|
50 |
+
# Coqui Stack
|
51 |
+
trainer>=0.0.36
|
52 |
+
coqpit>=0.0.16
|
53 |
+
|
54 |
+
# Autres dépendances
|
55 |
+
tqdm>=4.64.1
|
56 |
+
flask>=2.0.1
|
57 |
+
mutagen==1.47.0
|
58 |
+
inflect>=5.6.0
|
59 |
+
anyascii>=0.3.0
|
60 |
+
|
61 |
+
# Support pour le bangla
|
62 |
+
bangla
|
63 |
+
bnnumerizer
|
64 |
+
bnunicodenormalizer
|
start.json
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"run": [
|
3 |
+
{
|
4 |
+
"method": "shell.start",
|
5 |
+
"params": {
|
6 |
+
"env": {
|
7 |
+
"HF_HOME": "./huggingface",
|
8 |
+
"ALLOW_FILE_UPLOAD": "True",
|
9 |
+
"COQUI_TOS_AGREED": "1"
|
10 |
+
}
|
11 |
+
}
|
12 |
+
},
|
13 |
+
{
|
14 |
+
"method": "shell.enter",
|
15 |
+
"params": {
|
16 |
+
"message": "{{os.platform() === 'win32' ? 'env\\\\Scripts\\\\activate env' : 'source env/bin/activate env'}}",
|
17 |
+
"on": [
|
18 |
+
{
|
19 |
+
"event": null,
|
20 |
+
"return": true
|
21 |
+
}
|
22 |
+
]
|
23 |
+
}
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"method": "shell.enter",
|
27 |
+
"params": {
|
28 |
+
"message": "python app.py",
|
29 |
+
"on": [
|
30 |
+
{
|
31 |
+
"event": "/(http://[0-9.:]+)/",
|
32 |
+
"return": "{{event.matches[0][1]}}"
|
33 |
+
}
|
34 |
+
]
|
35 |
+
}
|
36 |
+
},
|
37 |
+
{
|
38 |
+
"method": "self.set",
|
39 |
+
"params": {
|
40 |
+
"session.json": {
|
41 |
+
"url": "{{input}}"
|
42 |
+
}
|
43 |
+
}
|
44 |
+
},
|
45 |
+
{
|
46 |
+
"method": "browser.open",
|
47 |
+
"params": {
|
48 |
+
"uri": "{{self.session.url}}",
|
49 |
+
"target": "_blank"
|
50 |
+
}
|
51 |
+
},
|
52 |
+
{
|
53 |
+
"method": "process.wait"
|
54 |
+
}
|
55 |
+
]
|
56 |
+
}
|