Spaces:
Build error
Build error
Commit
·
44bafb4
1
Parent(s):
38fa78c
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,42 @@
|
|
| 1 |
# !git clone https://github.com/Edresson/Coqui-TTS -b multilingual-torchaudio-SE TTS
|
| 2 |
|
|
|
|
|
|
|
| 3 |
import os
|
| 4 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
import string
|
| 10 |
import time
|
|
@@ -161,41 +193,6 @@ def voice_conversion(ta, ra, da):
|
|
| 161 |
|
| 162 |
return (ap.sample_rate, ref_wav_voc)
|
| 163 |
|
| 164 |
-
|
| 165 |
-
import os
|
| 166 |
-
import sys
|
| 167 |
-
|
| 168 |
-
os.system("git clone https://github.com/C0untFloyd/bark-gui.git")
|
| 169 |
-
sys.path.append("./bark-gui/")
|
| 170 |
-
|
| 171 |
-
from cProfile import label
|
| 172 |
-
from distutils.command.check import check
|
| 173 |
-
from doctest import Example
|
| 174 |
-
import gradio as gr
|
| 175 |
-
import numpy as np
|
| 176 |
-
import logging
|
| 177 |
-
import torch
|
| 178 |
-
import pytorch_seed
|
| 179 |
-
import time
|
| 180 |
-
|
| 181 |
-
from xml.sax import saxutils
|
| 182 |
-
from bark.api import generate_with_settings
|
| 183 |
-
from bark.api import save_as_prompt
|
| 184 |
-
from settings import Settings
|
| 185 |
-
#import nltk
|
| 186 |
-
|
| 187 |
-
from bark import SAMPLE_RATE
|
| 188 |
-
from bark.clonevoice import clone_voice
|
| 189 |
-
from bark.generation import SAMPLE_RATE, preload_models
|
| 190 |
-
from scipy.io.wavfile import write as write_wav
|
| 191 |
-
from parseinput import split_and_recombine_text, build_ssml, is_ssml, create_clips_from_ssml
|
| 192 |
-
from datetime import datetime
|
| 193 |
-
from tqdm.auto import tqdm
|
| 194 |
-
from id3tagging import add_id3_tag
|
| 195 |
-
|
| 196 |
-
OUTPUTFOLDER = "Outputs"
|
| 197 |
-
|
| 198 |
-
|
| 199 |
def generate_text_to_speech(text, selected_speaker, text_temp, waveform_temp, eos_prob, quick_generation, complete_settings, seed, progress=gr.Progress(track_tqdm=True)):
|
| 200 |
if text == None or len(text) < 1:
|
| 201 |
raise gr.Error('No text entered!')
|
|
|
|
| 1 |
# !git clone https://github.com/Edresson/Coqui-TTS -b multilingual-torchaudio-SE TTS
|
| 2 |
|
| 3 |
+
|
| 4 |
+
|
| 5 |
import os
|
| 6 |
+
import sys
|
| 7 |
+
|
| 8 |
+
os.system("git clone https://github.com/C0untFloyd/bark-gui.git")
|
| 9 |
+
sys.path.append("./bark-gui/")
|
| 10 |
+
|
| 11 |
+
from cProfile import label
|
| 12 |
+
from distutils.command.check import check
|
| 13 |
+
from doctest import Example
|
| 14 |
import gradio as gr
|
| 15 |
+
import numpy as np
|
| 16 |
+
import logging
|
| 17 |
+
import torch
|
| 18 |
+
import pytorch_seed
|
| 19 |
+
import time
|
| 20 |
|
| 21 |
+
from xml.sax import saxutils
|
| 22 |
+
from bark.api import generate_with_settings
|
| 23 |
+
from bark.api import save_as_prompt
|
| 24 |
+
from settings import Settings
|
| 25 |
+
#import nltk
|
| 26 |
+
|
| 27 |
+
from bark import SAMPLE_RATE
|
| 28 |
+
from bark.clonevoice import clone_voice
|
| 29 |
+
from bark.generation import SAMPLE_RATE, preload_models
|
| 30 |
+
from scipy.io.wavfile import write as write_wav
|
| 31 |
+
from parseinput import split_and_recombine_text, build_ssml, is_ssml, create_clips_from_ssml
|
| 32 |
+
from datetime import datetime
|
| 33 |
+
from tqdm.auto import tqdm
|
| 34 |
+
from id3tagging import add_id3_tag
|
| 35 |
+
|
| 36 |
+
OUTPUTFOLDER = "Outputs"
|
| 37 |
+
|
| 38 |
+
import shutil
|
| 39 |
+
import gradio as gr
|
| 40 |
|
| 41 |
import string
|
| 42 |
import time
|
|
|
|
| 193 |
|
| 194 |
return (ap.sample_rate, ref_wav_voc)
|
| 195 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
def generate_text_to_speech(text, selected_speaker, text_temp, waveform_temp, eos_prob, quick_generation, complete_settings, seed, progress=gr.Progress(track_tqdm=True)):
|
| 197 |
if text == None or len(text) < 1:
|
| 198 |
raise gr.Error('No text entered!')
|