An Emacs package that sends a selected region of text to the macOS say
command, which reads the text out loud using the default text-to-speech voice.
-- UPDATE: there is an espeak
alternative when on linux now. Let me know how that works. --
- Clone the repository or download the
say-region.el
file. - Add the following lines to your Emacs configuration (
init.el
or.emacs
):
(add-to-list 'load-path "/path/to/say-region.el")
(require 'say-region)
Replace /path/to/say-region.el
with the actual path to the say-region.el
file.
- Enable
say-region-mode
in a buffer:
M-x say-region-mode
- Select a region of text in the buffer.
- Press
C-c s
to send the selected region to thesay
command, which reads the text aloud. - To stop the speech, press
C-c k
to kill any running say processes.
This package is designed for macOS and uses the macOS-specific say
command. It is not compatible with other operating systems without modifications.
Feel free to submit pull requests, report bugs, or suggest new features by opening an issue on the GitHub repository.