DeepHorizons / tts

A simple python TTS wrapper
51 stars 19 forks source link

add volume support for SAPI #7

Closed jetfontanilla closed 4 years ago

jetfontanilla commented 4 years ago

adds volume support for SAPI

jetfontanilla commented 4 years ago

added additional support for American English Phoneme Representation

DeepHorizons commented 4 years ago

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)).

jetfontanilla commented 4 years ago

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!

DeepHorizons commented 4 years ago

Add a line back in the README about set_volume(), everything else looks excellent.

jetfontanilla commented 4 years ago

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!

DeepHorizons commented 4 years ago

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)
jetfontanilla commented 4 years ago

yup, just ran it myself as well and found the bug code now updated