Closed jetfontanilla closed 4 years ago
added additional support for American English Phoneme Representation
Thanks for the input. The set_volume()
code looks good but could you also update the README.md
file to match?
As for the extra flag the default value shouldn't be 16. It should also be more generic, I think Pythons Flag enum would be a great fit (https://docs.python.org/3/library/enum.html#enum.Flag). Use the same value from the SAPI spec, but feel free to remove the prefix from the name (https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms720892(v%3dvs.85)).
good comments, thanks for the review!
i've updated the PR with the suggestions you've made. please let me know if i need to update anything
thanks!
Add a line back in the README about set_volume()
, everything else looks excellent.
not very sure about the last message, but I added some spaces in the README so it's more logically grouped together let me know if this is what you meant. thanks!
Ran the code, works for me, one last change to the README, need to use the enum .value
property
voice.say('<PRON SYM = "h eh l ow"/>', tts.flags.SpeechVoiceSpeakFlags.IsXML.value)
voice.say('<speak version="1.0" xmlns="https://www.w3.org/2001/10/synthesis" xml:lang="en-US"><phoneme alphabet="sapi" ph="w er 1 l d"></phoneme></speak>', tts.flags.SpeechVoiceSpeakFlags.IsXML.value)
yup, just ran it myself as well and found the bug code now updated
adds volume support for SAPI