wujingjing
2025-04-14 77b15609b62c9bcd80fcdfd65f134a06252920b9
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();
   }