Post #933730
2026-04-04 07:23 UTC
Finally figured out how to have Emacs android use android tts.
1. Install termux
2. Install termux api
3. Install nmap (gnu netcat isn't available it seems)
4. nc -l -k -p 6000 | termux-tts-speak
5.
(defun android-tts-send-buffer (&optional host port)
"Send current buffer contents to Android TTS listener at HOST:PORT."
(interactive)
(let* ((host (or host "127.0.0.1"))
(port (or port 6000))
(text (buffer-substring-no-properties (point-min) (point-max)))
(proc (open-network-stream "android-tts" nil host port :type 'plain)))
(process-send-string proc (concat text "\n"))
(message "Sent buffer to %s:%s" host port)))
#emacs
Replies (1)
-
@tusharhero@mathstodon.xyz 2026-04-04 07:26
I guess I don't need to open need network processes each time. I can just keep piping to the same one.