Spaces:
Runtime error
Runtime error
antoniomae
commited on
Commit
•
3c4879a
1
Parent(s):
1f54695
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ theme = gr.themes.Base(
|
|
26 |
voicelist = ['f-pt-1', 'f-pt-2', 'f-pt-3', 'f-pt-4', 'm-pt-1', 'm-pt-2', 'm-pt-3', 'm-pt-4']
|
27 |
voices = {}
|
28 |
import phonemizer
|
29 |
-
global_phonemizer = phonemizer.backend.EspeakBackend(language='pt
|
30 |
# todo: cache computed style, load using pickle
|
31 |
# if os.path.exists('voices.pkl'):
|
32 |
# with open('voices.pkl', 'rb') as f:
|
@@ -127,7 +127,7 @@ with gr.Blocks() as vctk:
|
|
127 |
with gr.Row():
|
128 |
with gr.Column(scale=1):
|
129 |
inp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
|
130 |
-
voice = gr.Dropdown(voicelist, label="Voice", info="Select a default voice.", value='m-
|
131 |
multispeakersteps = gr.Slider(minimum=3, maximum=15, value=3, step=1, label="Diffusion Steps", info="Theoretically, higher should be better quality but slower, but we cannot notice a difference. Try with lower steps first - it is faster", interactive=True)
|
132 |
# use_gruut = gr.Checkbox(label="Use alternate phonemizer (Gruut) - Experimental")
|
133 |
with gr.Column(scale=1):
|
@@ -151,7 +151,7 @@ with gr.Blocks() as clone:
|
|
151 |
# with gr.Row():
|
152 |
# with gr.Column(scale=1):
|
153 |
# lnginp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
|
154 |
-
# lngvoice = gr.Dropdown(voicelist, label="Voice", info="Select a default voice.", value='m-
|
155 |
# lngsteps = gr.Slider(minimum=5, maximum=25, value=10, step=1, label="Diffusion Steps", info="Higher = better quality, but slower", interactive=True)
|
156 |
# lngpwd = gr.Textbox(label="Access code", info="This feature is in beta. You need an access code to use it as it uses more resources and we would like to prevent abuse")
|
157 |
# with gr.Column(scale=1):
|
|
|
26 |
voicelist = ['f-pt-1', 'f-pt-2', 'f-pt-3', 'f-pt-4', 'm-pt-1', 'm-pt-2', 'm-pt-3', 'm-pt-4']
|
27 |
voices = {}
|
28 |
import phonemizer
|
29 |
+
global_phonemizer = phonemizer.backend.EspeakBackend(language='pt', preserve_punctuation=True, with_stress=True)
|
30 |
# todo: cache computed style, load using pickle
|
31 |
# if os.path.exists('voices.pkl'):
|
32 |
# with open('voices.pkl', 'rb') as f:
|
|
|
127 |
with gr.Row():
|
128 |
with gr.Column(scale=1):
|
129 |
inp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
|
130 |
+
voice = gr.Dropdown(voicelist, label="Voice", info="Select a default voice.", value='m-pt-2', interactive=True)
|
131 |
multispeakersteps = gr.Slider(minimum=3, maximum=15, value=3, step=1, label="Diffusion Steps", info="Theoretically, higher should be better quality but slower, but we cannot notice a difference. Try with lower steps first - it is faster", interactive=True)
|
132 |
# use_gruut = gr.Checkbox(label="Use alternate phonemizer (Gruut) - Experimental")
|
133 |
with gr.Column(scale=1):
|
|
|
151 |
# with gr.Row():
|
152 |
# with gr.Column(scale=1):
|
153 |
# lnginp = gr.Textbox(label="Text", info="What would you like StyleTTS 2 to read? It works better on full sentences.", interactive=True)
|
154 |
+
# lngvoice = gr.Dropdown(voicelist, label="Voice", info="Select a default voice.", value='m-pt-1', interactive=True)
|
155 |
# lngsteps = gr.Slider(minimum=5, maximum=25, value=10, step=1, label="Diffusion Steps", info="Higher = better quality, but slower", interactive=True)
|
156 |
# lngpwd = gr.Textbox(label="Access code", info="This feature is in beta. You need an access code to use it as it uses more resources and we would like to prevent abuse")
|
157 |
# with gr.Column(scale=1):
|