If you can, I would appreciate your help in contributions to the repo and/or donations!
You already found me on Github, But, Hey!
Check me out on StackOverflow.com OR Checkout my other Repo "Random Scripts"!
So this is based on the Mac's 'text to speech' function in Sublime Text 3. Previously from Scott Martin
When Sublime Text 3 came out, they changed the way this feature worked with they system, breaking the functionality from the previous versions.
This plug-in has been designed & updated for use with Mac OS X, and it is only needed for OS X 10.14 and higher.
Once you have Git installed, just go into Sublime's Packages folder and clone the repo.
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/
git clone https://github.com/jayrizzo/speak-selected-text-sublime.git "Speak_Selected_Text"
mv Speak_Selected_Text/Context.sublime-menu ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Context.sublime-menu
mv Speak_Selected_Text/SpeakSelectedText.py ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/SpeakSelectedText.py
# cleanup
rm -rf ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Speak_Selected_Text
From within Sublime Text 3, you can use the plug-in one of three ways.
- Right-click your selection and choose "Speak Selected Text" from the context menu.
- Use Sublime's command palette and search for "Speak Selected Text".
- Create a Sublime Text key-binding mapped to the "speak_selected_text" command
Note: The key-binding cannot be the same as the OS shortcut, or the OS shortcut will override it!
Note: You can run the command again to stop the speech at any time.