ms-types 0.0.56 → 0.0.58
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.
- package/package.json +1 -1
- package/types/tts.d.ts +9 -2
package/package.json
CHANGED
package/types/tts.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ declare namespace tts {
|
|
|
81
81
|
* @example
|
|
82
82
|
* const voices = tts.getAvailableVoices();
|
|
83
83
|
* voices.forEach(voice => {
|
|
84
|
-
* logger.info(`语音: ${voice.name}, 语言: ${voice.language}, 标识符: ${voice.identifier}`);
|
|
84
|
+
* logger.info(`语音: ${voice.name}, 语言: ${voice.language}, 标识符: ${voice.identifier}, 质量: ${voice.quality}`);
|
|
85
85
|
* });
|
|
86
86
|
*/
|
|
87
87
|
function getAvailableVoices(): VoiceInfo[];
|
|
@@ -91,10 +91,17 @@ declare namespace tts {
|
|
|
91
91
|
* @param voiceIdentifier 语音标识符
|
|
92
92
|
* @returns 是否设置成功
|
|
93
93
|
* @example
|
|
94
|
-
* const success = tts.setVoice("com.apple.ttsbundle.
|
|
94
|
+
* const success = tts.setVoice("com.apple.ttsbundle.siri_Yu-shu_zh-CN_compact");
|
|
95
95
|
* if (success) {
|
|
96
96
|
* logger.info("语音设置成功");
|
|
97
97
|
* }
|
|
98
98
|
*/
|
|
99
99
|
function setVoice(voiceIdentifier: string): boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 释放TTS资源
|
|
103
|
+
* @example
|
|
104
|
+
* tts.free();
|
|
105
|
+
*/
|
|
106
|
+
function free(): void;
|
|
100
107
|
}
|