mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04: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):
|
def state_modifier(state):
|
||||||
|
if not params['activate']:
|
||||||
|
return state
|
||||||
|
|
||||||
state['stream'] = False
|
state['stream'] = False
|
||||||
return state
|
return state
|
||||||
|
|
||||||
|
|
||||||
def input_modifier(string):
|
def input_modifier(string):
|
||||||
"""
|
if not params['activate']:
|
||||||
This function is applied to your text inputs before
|
return string
|
||||||
they are fed into the model.
|
|
||||||
"""
|
|
||||||
|
|
||||||
shared.processing_message = "*Is recording a voice message...*"
|
shared.processing_message = "*Is recording a voice message...*"
|
||||||
return string
|
return string
|
||||||
|
|
||||||
|
|
||||||
def history_modifier(history):
|
def history_modifier(history):
|
||||||
|
|
||||||
# Remove autoplay from the last reply
|
# Remove autoplay from the last reply
|
||||||
if len(history['internal']) > 0:
|
if len(history['internal']) > 0:
|
||||||
history['visible'][-1] = [
|
history['visible'][-1] = [
|
||||||
@ -89,10 +89,6 @@ def history_modifier(history):
|
|||||||
|
|
||||||
|
|
||||||
def output_modifier(string):
|
def output_modifier(string):
|
||||||
"""
|
|
||||||
This function is applied to the model outputs.
|
|
||||||
"""
|
|
||||||
|
|
||||||
global params, wav_idx
|
global params, wav_idx
|
||||||
|
|
||||||
if not params['activate']:
|
if not params['activate']:
|
||||||
|
@ -73,22 +73,22 @@ def toggle_text_in_history():
|
|||||||
|
|
||||||
|
|
||||||
def state_modifier(state):
|
def state_modifier(state):
|
||||||
|
if not params['activate']:
|
||||||
|
return state
|
||||||
|
|
||||||
state['stream'] = False
|
state['stream'] = False
|
||||||
return state
|
return state
|
||||||
|
|
||||||
|
|
||||||
def input_modifier(string):
|
def input_modifier(string):
|
||||||
"""
|
if not params['activate']:
|
||||||
This function is applied to your text inputs before
|
return string
|
||||||
they are fed into the model.
|
|
||||||
"""
|
|
||||||
|
|
||||||
shared.processing_message = "*Is recording a voice message...*"
|
shared.processing_message = "*Is recording a voice message...*"
|
||||||
return string
|
return string
|
||||||
|
|
||||||
|
|
||||||
def history_modifier(history):
|
def history_modifier(history):
|
||||||
|
|
||||||
# Remove autoplay from the last reply
|
# Remove autoplay from the last reply
|
||||||
if len(history['internal']) > 0:
|
if len(history['internal']) > 0:
|
||||||
history['visible'][-1] = [
|
history['visible'][-1] = [
|
||||||
@ -100,12 +100,7 @@ def history_modifier(history):
|
|||||||
|
|
||||||
|
|
||||||
def output_modifier(string):
|
def output_modifier(string):
|
||||||
"""
|
|
||||||
This function is applied to the model outputs.
|
|
||||||
"""
|
|
||||||
|
|
||||||
global model, current_params, streaming_state
|
global model, current_params, streaming_state
|
||||||
|
|
||||||
for i in params:
|
for i in params:
|
||||||
if params[i] != current_params[i]:
|
if params[i] != current_params[i]:
|
||||||
model = load_model()
|
model = load_model()
|
||||||
|
Loading…
Reference in New Issue
Block a user