tom-s / speak-tts

76 stars 19 forks source link

Support Multiple Voices Per Language #3

Closed tariq86 closed 6 years ago

tariq86 commented 7 years ago

This PR adds a setVoice method, which adds support for multiple voices for languages that have multiple voices. For example, language code en-US on macOS currently has 4 languages: "Alex", "Fred", "Samantha", and "Google US English". Using the existing setLanguage method is always using voice "Alex", since it is the first voice for that language code. You can now use the new setVoice method to use any of the other available voices.

New Method: setVoice(voice), where voice can be:

tom-s commented 7 years ago

Thanks that's great ! I'll give it a go when I've got a bit of time, and build a new version if it all works.

tom-s commented 6 years ago

Thanks for you input (and sorry for the delay), your contribution has been included in version 1.1.0 (available on npm)