Skip to content

Instantly share code, notes, and snippets.

@tam17aki
Last active December 26, 2015 16:39
Show Gist options
  • Save tam17aki/7181621 to your computer and use it in GitHub Desktop.
Save tam17aki/7181621 to your computer and use it in GitHub Desktop.
A wrapper for Softalk. This Emacs lisp can be used on only Windows.
(defvar softalk-command (concat (replace-regexp-in-string
"\\\\" "/" (getenv "INST_DIR"))
"/home/src/softalk/SofTalk.exe"))
(defvar softalk-speed 100)
(defvar softalk-volume 100)
(defun softalk-text (text)
(deferred:$
(deferred:process "sh" "-c"
(format "%s /X:1 /V:%s /S:%s /W: %s"
softalk-command softalk-volume softalk-speed text))))
(defun softalk-region (start end)
(interactive "r")
(softalk-text
(replace-regexp-in-string
"\n" "" (buffer-substring-no-properties start end))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment