From a459703424771e254779f88f6116bac2082f0849 Mon Sep 17 00:00:00 2001 From: afred Date: Sat, 4 Jan 2025 15:33:10 +0800 Subject: [PATCH] change edge tts _SSMLTemplate --- app/utils/ms_edge_tts.ts | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/app/utils/ms_edge_tts.ts b/app/utils/ms_edge_tts.ts index 4da00143e..f291ebada 100644 --- a/app/utils/ms_edge_tts.ts +++ b/app/utils/ms_edge_tts.ts @@ -233,23 +233,15 @@ export class MsEdgeTTS { } private _SSMLTemplate(input: string, options: ProsodyOptions = {}): string { - // 对 input 进行特殊字符替换 - input = input - .replace(/&/g, "&") - .replace(//g, ">"); - - // 合并默认选项与传入选项 + // in case future updates to the edge API block these elements, we'll be concatenating strings. options = { ...new ProsodyOptions(), ...options }; - - return ` - - - - ${input} - - - `; + return ` + + + ${input} + + + `; } /**