perf: speech check (#3351)

* perf: speech check

* perf: version
This commit is contained in:
Archer
2024-12-09 21:27:07 +08:00
committed by GitHub
parent 15dc7b220e
commit 1b8b11239c
4 changed files with 16 additions and 7 deletions

View File

@@ -103,7 +103,7 @@ export const useAudioPlay = (
const cancelAudio = useCallback(() => {
try {
window.speechSynthesis?.cancel();
audioController.current.abort('');
!audioController.current.signal.aborted && audioController.current.abort();
} catch (error) {}
if (audioRef.current) {
audioRef.current.pause();