Skip to content

Commit

Permalink
add ssml
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasBack2Future authored and wangyoucao577 committed Nov 22, 2024
1 parent bead1f7 commit 8dcb0a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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}});
Expand Down

0 comments on commit 8dcb0a6

Please sign in to comment.