From 74d5f3adc588868fd8c026d31527b50904432e91 Mon Sep 17 00:00:00 2001 From: timothycarambat <rambat1010@gmail.com> Date: Wed, 7 Aug 2024 14:28:57 -0700 Subject: [PATCH] debounce piper button --- frontend/src/components/TextToSpeech/PiperTTSOptions/index.jsx | 1 + .../ChatHistory/HistoricalMessage/Actions/TTSButton/piperTTS.jsx | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/src/components/TextToSpeech/PiperTTSOptions/index.jsx b/frontend/src/components/TextToSpeech/PiperTTSOptions/index.jsx index 323bf3ad5..48b87efe7 100644 --- a/frontend/src/components/TextToSpeech/PiperTTSOptions/index.jsx +++ b/frontend/src/components/TextToSpeech/PiperTTSOptions/index.jsx @@ -185,6 +185,7 @@ function DemoVoiceSample({ voiceId }) { <button type="button" onClick={speakMessage} + disabled={loading} className="border-none text-zinc-300 flex items-center gap-x-1" > {speaking ? ( diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/piperTTS.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/piperTTS.jsx index d384faf1e..f8431a3bd 100644 --- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/piperTTS.jsx +++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/HistoricalMessage/Actions/TTSButton/piperTTS.jsx @@ -53,6 +53,7 @@ export default function PiperTTS({ voiceId = null, message }) { <button type="button" onClick={speakMessage} + disabled={loading} data-tooltip-id="message-to-speech" data-tooltip-content={ speaking ? "Pause TTS speech of message" : "TTS Speak message" -- GitLab