Spaces:
Running
Running
Fix + shift
Browse files
app.py
CHANGED
@@ -44,7 +44,10 @@ def init_models():
|
|
44 |
def tts(text: str, voice: str, mode: str):
|
45 |
# accentor
|
46 |
accented_text = accentification(text, mode)
|
47 |
-
|
|
|
|
|
|
|
48 |
# TTS
|
49 |
synt = models[voice]
|
50 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|
|
|
44 |
def tts(text: str, voice: str, mode: str):
|
45 |
# accentor
|
46 |
accented_text = accentification(text, mode)
|
47 |
+
if (mode != "none"):
|
48 |
+
plussed_text = stress_replace_and_shift(accented_text)
|
49 |
+
else:
|
50 |
+
plussed_text = accented_text
|
51 |
# TTS
|
52 |
synt = models[voice]
|
53 |
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as fp:
|