mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 09:19:23 +01:00
FIX silero_tts/elevenlabs_tts activation/deactivation (#2313)
This commit is contained in:
parent
fc116711b0
commit
e50ade438a
@ -62,22 +62,22 @@ def remove_surrounded_chars(string):
|
||||
|
||||
|
||||
def state_modifier(state):
|
||||
if not params['activate']:
|
||||
return state
|
||||
|
||||
state['stream'] = False
|
||||
return state
|
||||
|
||||
|
||||
def input_modifier(string):
|
||||
"""
|
||||
This function is applied to your text inputs before
|
||||
they are fed into the model.
|
||||
"""
|
||||
if not params['activate']:
|
||||
return string
|
||||
|
||||
shared.processing_message = "*Is recording a voice message...*"
|
||||
return string
|
||||
|
||||
|
||||
def history_modifier(history):
|
||||
|
||||
# Remove autoplay from the last reply
|
||||
if len(history['internal']) > 0:
|
||||
history['visible'][-1] = [
|
||||
@ -89,10 +89,6 @@ def history_modifier(history):
|
||||
|
||||
|
||||
def output_modifier(string):
|
||||
"""
|
||||
This function is applied to the model outputs.
|
||||
"""
|
||||
|
||||
global params, wav_idx
|
||||
|
||||
if not params['activate']:
|
||||
|
@ -73,22 +73,22 @@ def toggle_text_in_history():
|
||||
|
||||
|
||||
def state_modifier(state):
|
||||
if not params['activate']:
|
||||
return state
|
||||
|
||||
state['stream'] = False
|
||||
return state
|
||||
|
||||
|
||||
def input_modifier(string):
|
||||
"""
|
||||
This function is applied to your text inputs before
|
||||
they are fed into the model.
|
||||
"""
|
||||
if not params['activate']:
|
||||
return string
|
||||
|
||||
shared.processing_message = "*Is recording a voice message...*"
|
||||
return string
|
||||
|
||||
|
||||
def history_modifier(history):
|
||||
|
||||
# Remove autoplay from the last reply
|
||||
if len(history['internal']) > 0:
|
||||
history['visible'][-1] = [
|
||||
@ -100,12 +100,7 @@ def history_modifier(history):
|
||||
|
||||
|
||||
def output_modifier(string):
|
||||
"""
|
||||
This function is applied to the model outputs.
|
||||
"""
|
||||
|
||||
global model, current_params, streaming_state
|
||||
|
||||
for i in params:
|
||||
if params[i] != current_params[i]:
|
||||
model = load_model()
|
||||
|
Loading…
Reference in New Issue
Block a user