wujingjing
2025-04-02 f07405d8787e8bbd43453c81ec4f599dc34153b9
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();
   }