diff --git a/web/app/components/base/voice-input/index.tsx b/web/app/components/base/voice-input/index.tsx index b42e3b849e..07b3c5ddcf 100644 --- a/web/app/components/base/voice-input/index.tsx +++ b/web/app/components/base/voice-input/index.tsx @@ -152,6 +152,10 @@ const VoiceInput = ({ useEffect(() => { initCanvas() handleStartRecord() + const recorderRef = recorder?.current + return () => { + recorderRef?.stop() + } }, []) const minutes = parseInt(`${parseInt(`${originDuration}`) / 60}`)