Born to be geek!

My Emacs talks to me

Escrito el Lunes 7 Septiembre 2009

A couple of weeks ago, I discovered a post in Abram Hindle’s blog about editing techniques, and reading aloud to edit research papers. He includes some scripts and configuration stuff for Emacs. I have adapted his scripts to suit my system. Here it is what I have added to ~/.emacs


(defun tex-speak ()
  (interactive)
  (shell-command-on-region (point)
                           (mark) "untex  -m -o -e -a - | festival --pipe ~/bin/festivaltts > /dev/null" nil nil))

(global-set-key "\M-t" 'tex-speak)

It removes LaTeX formatting from a paragraph, and pipe the output to festival, that reads the text aloud (you will need to install untex and festival). I am using Alt+t to make Emacs to read the currently selected region, that I think it is assigned to another option by default. But it is an option that I don’t use at all. If it interferes with your setup, just change the keybinding.

The file ~/bin/festivaltts configures the voices used to read the text, and in my case it contains the following


(tts_file "-")
(quit)

which means that festival will read just with the default voice that it includes.

But more important than just making Emacs reading texts, it is that I have discovered a new way of writing papers. I have started a couple of papers since I set up this, and I think I am writing text of much higher quality if Emacs reads it back to me after some advances. Besides, it helps you to avoid a lot of usual mistakes that happen while writing papers, like misspellings, repeated or missing words, etc, because it just sounds awkward when Emacs reads it.

I strongly recommend to anyone writing papers, a PhD thesis, or whatever, to try this out, in particular if you are a non-native English speaker.


  1.  
    Juanjo Marin
    8.9.2009 | 9:08 pm
     

    It’s really cool !!!! I’ll try it :)

  2.  
    Juanjo Marin
    8.9.2009 | 9:09 pm
     

    It’ really cool !!!

    I think I have to try this :)

  3.  
    Anónimo
    9.12.2009 | 12:11 pm
     

    Great! My emacs also talks to me now! Thanks :)

  4.  
    José Miguel
    9.12.2009 | 12:15 pm
     

    The last Anónimo was me…

Disculpa, los comentarios están cerrados.