From 8dcb0a620f2b9a3bae7a0d7705c07e6a9aa5726e Mon Sep 17 00:00:00 2001 From: TomasLiu Date: Fri, 22 Nov 2024 23:11:01 +0800 Subject: [PATCH] add ssml --- src/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cc b/src/main.cc index aff78d0..d979afa 100644 --- a/src/main.cc +++ b/src/main.cc @@ -163,11 +163,11 @@ class azure_tts_extension_t : public ten::extension_t { text = trimString(text); // push received text to tts queue for synthesis - if (!prosody_.empty() || !language_.empty() || !role_.empty() || !style_.empty()) { + if (!language_.empty() && (!prosody_.empty() || !role_.empty() || !style_.empty())) { MsttsTemplate tmpl; auto ssml_text = tmpl.replace(json{{"role", role_}, {"voice", voice_}, - {"language", language_}, + {"lang", language_}, {"style", style_}, {"prosody", prosody_}, {"text", text}});