ms-types 0.0.57 → 0.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types/tts.d.ts +13 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-types",
3
- "version": "0.0.57",
3
+ "version": "0.0.59",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
package/types/tts.d.ts CHANGED
@@ -45,25 +45,18 @@ declare namespace tts {
45
45
  function speak(text: string): boolean;
46
46
 
47
47
  /**
48
- * 停止当前播放
49
- * @example
50
- * tts.stop();
51
- */
52
- function stop(): void;
53
-
54
- /**
55
- * 暂停播放
48
+ * 等待当前语音播放结束
56
49
  * @example
57
- * tts.pause();
50
+ * tts.waitEnd();
58
51
  */
59
- function pause(): void;
52
+ function waitEnd(): void;
60
53
 
61
54
  /**
62
- * 继续播放
55
+ * 停止当前播放
63
56
  * @example
64
- * tts.resume();
57
+ * tts.stop();
65
58
  */
66
- function resume(): void;
59
+ function stop(): void;
67
60
 
68
61
  /**
69
62
  * 检查是否正在播放
@@ -97,4 +90,11 @@ declare namespace tts {
97
90
  * }
98
91
  */
99
92
  function setVoice(voiceIdentifier: string): boolean;
93
+
94
+ /**
95
+ * 释放TTS资源(调用时,会停止当前播放并释放资源)
96
+ * @example
97
+ * tts.free();
98
+ */
99
+ function free(): void;
100
100
  }