Fix silero tts autoplay (attempt #2)
This commit is contained in:
parent
a5d5bb9390
commit
1e5821bd9e
4 changed files with 25 additions and 9 deletions
|
@ -83,17 +83,22 @@ def input_modifier(string):
|
|||
they are fed into the model.
|
||||
"""
|
||||
|
||||
# Remove autoplay from the last reply
|
||||
if shared.is_chat() and len(shared.history['internal']) > 0:
|
||||
shared.history['visible'][-1] = [
|
||||
shared.history['visible'][-1][0],
|
||||
shared.history['visible'][-1][1].replace('controls autoplay>', 'controls>')
|
||||
]
|
||||
|
||||
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] = [
|
||||
history['visible'][-1][0],
|
||||
history['visible'][-1][1].replace('controls autoplay>', 'controls>')
|
||||
]
|
||||
|
||||
return history
|
||||
|
||||
|
||||
def output_modifier(string):
|
||||
"""
|
||||
This function is applied to the model outputs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue