We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0b9d6bc + 7644856 commit bdac870Copy full SHA for bdac870
edenai_apis/utils/ssml.py
@@ -73,11 +73,14 @@ def convert_audio_attr_in_prosody_tag(
73
idx_before_last_tag = get_index_before_last_speak_tag(text)
74
75
if idx_after_first_tag == -1 or idx_before_last_tag == -1:
76
+ escaped_text = (
77
+ text.replace("&", "&").replace("<", "<").replace(">", ">")
78
+ )
79
return (
80
f"<speak{f' {speak_attr}' if speak_attr else ''}>"
81
+ f"{voice_tag}"
82
+ (f"<prosody {cleaned_attribs}>" if cleaned_attribs else "")
- + text
83
+ + escaped_text
84
+ (f"</prosody>" if cleaned_attribs else "")
85
+ f"{f'</voice>' if voice_tag else ''}</speak>"
86
)
0 commit comments