src/utils/speech/synthesis.ts
@@ -49,6 +49,15 @@ this.synth.speak(this.synthesis); } public onEnd(callback: () => void): void { this.synthesis.addEventListener('end', callback); } // 移除事件监听 public off(callback: () => void): void { this.synth.removeEventListener('end', callback); } public pause(): void { this.synth.pause(); }