nateshmbhat / pyttsx3

Offline Text To Speech synthesis for python
Mozilla Public License 2.0
2.09k stars 330 forks source link

Use `.get` to avoid `KeyError` on voice attributes #269

Closed thevickypedia closed 1 year ago

thevickypedia commented 1 year ago

Upon updating to macOS Ventura 13.0, I identified that it lacks the key VoiceAge among its attributes. Instead of using [] to get the dict values, I switched it to .get which is also a more safe and pythonic way of getting dict values.

thevickypedia commented 1 year ago

More conversation around this can be found in https://github.com/nateshmbhat/pyttsx3/pull/247 I accidentally closed it when I deleted the forked repo