From 91c2a8e88d4271991f85a61cb8721faba6a34efd Mon Sep 17 00:00:00 2001 From: stefanhamburger <9825318+stefanhamburger@users.noreply.github.com> Date: Mon, 13 Mar 2023 07:42:09 +0100 Subject: [PATCH] Fix: tuple object does not support item assignment --- extensions/silero_tts/script.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/silero_tts/script.py b/extensions/silero_tts/script.py index bc660483..1d068229 100644 --- a/extensions/silero_tts/script.py +++ b/extensions/silero_tts/script.py @@ -57,7 +57,7 @@ def remove_surrounded_chars(string): def remove_tts_from_history(name1, name2): for i, entry in enumerate(shared.history['internal']): - shared.history['visible'][i][1] = entry[1] + shared.history['visible'][i] = [shared.history['visible'][i][0], entry[1]] return chat.generate_chat_output(shared.history['visible'], name1, name2, shared.character) def toggle_text_in_history(name1, name2): @@ -66,9 +66,9 @@ def toggle_text_in_history(name1, name2): if visible_reply.startswith('')[0]}\n\n{reply}" + shared.history['visible'][i] = [shared.history['visible'][i][0], f"{visible_reply.split('')[0]}\n\n{reply}"] else: - shared.history['visible'][i][1] = f"{visible_reply.split('')[0]}" + shared.history['visible'][i] = [shared.history['visible'][i][0], f"{visible_reply.split('')[0]}"] return chat.generate_chat_output(shared.history['visible'], name1, name2, shared.character) def input_modifier(string): @@ -79,7 +79,7 @@ def input_modifier(string): # Remove autoplay from the last reply if (shared.args.chat or shared.args.cai_chat) and len(shared.history['internal']) > 0: - shared.history['visible'][-1][1] = shared.history['visible'][-1][1].replace('controls autoplay>','controls>') + shared.history['visible'][-1] = [shared.history['visible'][-1][0], shared.history['visible'][-1][1].replace('controls autoplay>','controls>')] return string