From cb226247e8c1f400d4bdaf1b29f74006e295dc93 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Thu, 16 Feb 2023 23:38:27 -0300 Subject: [PATCH] Make it possible to disable the TTS from within the interface --- extensions/silero_tts/script.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/silero_tts/script.py b/extensions/silero_tts/script.py index b1570823..3328422b 100644 --- a/extensions/silero_tts/script.py +++ b/extensions/silero_tts/script.py @@ -6,6 +6,7 @@ import torch torch._C._jit_set_profiling_mode(False) params = { + 'activate': True, 'speaker': 'en_56', 'language': 'en', 'model_id': 'v3_en', @@ -52,6 +53,9 @@ def output_modifier(string): current_params = params.copy() break + if params['activate'] == False: + return string + string = remove_surrounded_chars(string) string = string.replace('"', '') string = string.replace('“', '')