Update app.py
Browse files
app.py
CHANGED
@@ -15,11 +15,10 @@ models = {k: TTS(k) for k in models}
|
|
15 |
accentizer = RUAccent()
|
16 |
accentizer.load(omograph_model_size='turbo3.1', use_dictionary=True)
|
17 |
|
18 |
-
# Функция для предобработки текста (акцентуация и ё)
|
19 |
-
|
20 |
# Функция для синтеза речи
|
21 |
def text_to_speech(model_name, length_scale, text, prep_text):
|
22 |
if prep_text:
|
|
|
23 |
text = accentizer.process_all(text)
|
24 |
audio = models[model_name](text, length_scale=length_scale)
|
25 |
models[model_name].save_wav(audio, 'temp.wav', sample_rate=models[model_name].config["samplerate"])
|
|
|
15 |
accentizer = RUAccent()
|
16 |
accentizer.load(omograph_model_size='turbo3.1', use_dictionary=True)
|
17 |
|
|
|
|
|
18 |
# Функция для синтеза речи
|
19 |
def text_to_speech(model_name, length_scale, text, prep_text):
|
20 |
if prep_text:
|
21 |
+
# Функция для предобработки текста (акцентуация и ё)
|
22 |
text = accentizer.process_all(text)
|
23 |
audio = models[model_name](text, length_scale=length_scale)
|
24 |
models[model_name].save_wav(audio, 'temp.wav', sample_rate=models[model_name].config["samplerate"])
|