Zero promises on quality lol - John
This program is an Anki add-on that allows the user to use the native text-to-speech functionality of macOS to speak highlighted words. When the user highlights a word, a “Speak” option is added to the context menu that appears when the user right-clicks on the highlighted word. When the user selects the “Speak” option, the highlighted word is passed to the macOS “say” command-line utility, which uses the native text-to-speech functionality to speak the word.
The add-on is written in Python and uses the anki.hooks library to listen for the event of a word being highlighted and the subprocess library to run the “say” command-line utility. This add-on is compatible with macOS and it uses the default voice configuration set in the system preferences.
Please note that this add-on should be saved with a .py extension and should be placed in the appropriate directory for Anki add-ons. Also, be sure to distribute it in a way that respects the copyright laws and user’s privacy.