Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for SSML #14

Closed
daniele-athome opened this issue Jan 15, 2021 · 2 comments
Closed

Support for SSML #14

daniele-athome opened this issue Jan 15, 2021 · 2 comments

Comments

@daniele-athome
Copy link

I've been using a patched version of your library to accept SSML in the text, but it's kind of hard-coded:

diff -rNu pycsspeechtts_old/pycsspeechtts.py pycsspeechtts/pycsspeechtts.py
--- pycsspeechtts_old/pycsspeechtts.py  2020-12-29 02:06:51.014818639 +0100
+++ pycsspeechtts/pycsspeechtts.py      2020-12-29 01:51:28.205551472 +0100
@@ -49,7 +49,7 @@
         prosody.set('volume', volume)
         prosody.set('pitch', pitch)
         prosody.set('contour', contour)
-        prosody.text = text
+        prosody.append(ElementTree.fromstring(text))

         headers = {"Content-Type": "application/ssml+xml",
                    "X-Microsoft-OutputFormat": output,

Would you accept a PR for this? It should be backwards compatible in some ways, but the text must be valid XML otherwise it will throw an exception. Or maybe add a boolean parameter (xml_text=True/False)? What do you think?

Thanks!

@jeroenterheerdt
Copy link
Owner

jeroenterheerdt commented Jan 15, 2021 via email

@iridris
Copy link
Contributor

iridris commented Sep 17, 2022

Since the PR for this feature was merged, can a new release be tagged to bump up the version number?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants