From 5dd212cf52433018facc2be993126c27d02f6b59 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:57:52 -0700 Subject: [PATCH] TTS extensions fixes after #4022 --- extensions/elevenlabs_tts/script.py | 4 ++-- extensions/silero_tts/script.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/elevenlabs_tts/script.py b/extensions/elevenlabs_tts/script.py index 68ae16bd..af0c7458 100644 --- a/extensions/elevenlabs_tts/script.py +++ b/extensions/elevenlabs_tts/script.py @@ -174,7 +174,7 @@ def ui(): convert_confirm.click( lambda: [gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)], None, convert_arr).then( remove_tts_from_history, gradio('history'), gradio('history')).then( - chat.save_persistent_history, gradio('history', 'character_menu', 'mode'), None).then( + chat.save_history, gradio('history', 'unique_id', 'character_menu', 'mode'), None).then( chat.redraw_html, gradio(ui_chat.reload_arr), gradio('display')) convert_cancel.click(lambda: [gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)], None, convert_arr) @@ -183,7 +183,7 @@ def ui(): show_text.change( lambda x: params.update({"show_text": x}), show_text, None).then( toggle_text_in_history, gradio('history'), gradio('history')).then( - chat.save_persistent_history, gradio('history', 'character_menu', 'mode'), None).then( + chat.save_history, gradio('history', 'unique_id', 'character_menu', 'mode'), None).then( chat.redraw_html, gradio(ui_chat.reload_arr), gradio('display')) # Event functions to update the parameters in the backend diff --git a/extensions/silero_tts/script.py b/extensions/silero_tts/script.py index 453207a7..e4bacc72 100644 --- a/extensions/silero_tts/script.py +++ b/extensions/silero_tts/script.py @@ -229,7 +229,7 @@ def ui(): convert_confirm.click( lambda: [gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)], None, convert_arr).then( remove_tts_from_history, gradio('history'), gradio('history')).then( - chat.save_persistent_history, gradio('history', 'character_menu', 'mode'), None).then( + chat.save_history, gradio('history', 'unique_id', 'character_menu', 'mode'), None).then( chat.redraw_html, gradio(ui_chat.reload_arr), gradio('display')) convert_cancel.click(lambda: [gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)], None, convert_arr) @@ -238,7 +238,7 @@ def ui(): show_text.change( lambda x: params.update({"show_text": x}), show_text, None).then( toggle_text_in_history, gradio('history'), gradio('history')).then( - chat.save_persistent_history, gradio('history', 'character_menu', 'mode'), None).then( + chat.save_history, gradio('history', 'unique_id', 'character_menu', 'mode'), None).then( chat.redraw_html, gradio(ui_chat.reload_arr), gradio('display')) # Event functions to update the parameters in the backend