From 77b15609b62c9bcd80fcdfd65f134a06252920b9 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期一, 14 四月 2025 17:11:21 +0800
Subject: [PATCH] 48px

---
 src/utils/speech/synthesis.ts |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/utils/speech/synthesis.ts b/src/utils/speech/synthesis.ts
index ab535cf..b96a953 100644
--- a/src/utils/speech/synthesis.ts
+++ b/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();
 	}

--
Gitblit v1.9.3