diff --git a/app/utils/ms_edge_tts.ts b/app/utils/ms_edge_tts.ts
index f291ebada..4da00143e 100644
--- a/app/utils/ms_edge_tts.ts
+++ b/app/utils/ms_edge_tts.ts
@@ -233,15 +233,23 @@ export class MsEdgeTTS {
}
private _SSMLTemplate(input: string, options: ProsodyOptions = {}): string {
- // in case future updates to the edge API block these elements, we'll be concatenating strings.
+ // 对 input 进行特殊字符替换
+ input = input
+ .replace(/&/g, "&")
+ .replace(//g, ">");
+
+ // 合并默认选项与传入选项
options = { ...new ProsodyOptions(), ...options };
- return `
-
-
- ${input}
-
-
- `;
+
+ return `
+
+
+
+ ${input}
+
+
+ `;
}
/**