RapidWareTech / pyttsx

Cross-platform text-to-speech wrapper
Other
370 stars 134 forks source link

Mac VoiceLanguage is now VoiceLocaleIdentifier #9

Closed turtlegraphics closed 11 years ago

turtlegraphics commented 11 years ago

pyttsx 1.0 was working fine for me on a Mac running Lion. Then I added some new I18n voices (via the Dictation & Speech) control panel, and pyttsx started crashing on the getProperty('voices') call, making it essentially unusable. Version 1.1 of pyttsx has the same bug.

I traced the error to line 70 of drivers/nsss.py, where it has attr['VoiceLanguage'], which is now deprecated. Changing this to attr['VoiceLocaleIdentifier'] fixed the problem. It appears VoiceLanguage was deprecated in OSX10.5, and now has actually ceased to exist for some voices.

parente commented 11 years ago

Thanks for the report and fix. I pushed it to the master branch with a fallback on the old VoiceLanguage property for older OS X versions.

turtlegraphics commented 11 years ago

Great - and thanks for the software. Nice work!

Bryan

On Jan 8, 2013, at 8:12 PM, Peter Parente notifications@github.com wrote:

Thanks for the report and fix. I pushed it to the master branch with a fallback on the old VoiceLanguage property for older OS X versions.

— Reply to this email directly or view it on GitHub.