From ab4bf3ba67f0d3354cbaa3e9d066257235b8ee8e Mon Sep 17 00:00:00 2001 From: dakai Date: Wed, 16 Oct 2024 11:34:20 +0800 Subject: [PATCH] remove redundancy code --- app/components/tts-config.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/components/tts-config.tsx b/app/components/tts-config.tsx index 091f554452b..0ca82567e18 100644 --- a/app/components/tts-config.tsx +++ b/app/components/tts-config.tsx @@ -140,14 +140,9 @@ export function TTSConfigList(props: { : Locale.Chat.Actions.Speech } onClick={() => { - if (speechStatus) { - ttsPlayer.stop(); - setSpeechStatus(false); - } else { - openaiSpeech( - "NextChat,Unleash your imagination, experience the future of AI conversation.", - ); - } + openaiSpeech( + "NextChat,Unleash your imagination, experience the future of AI conversation.", + ); }} />