tts-mode in emacs

TTS mode for emacs

TTS mode for emacs

There are a scene in The big-bang theory, a America TV drama, Sheldon use his laptop computer to emulate human voice. That's really cool. Actually What Sheldon did is just install a TTS software, TTS short for Text To Speech.

Table of Contents

  • 1 TTS engine in linux platform
  • 2 The simple way to use Festival and Espeak
  • 3 Why TTS mode?
  • 4 How to use TTS mode?

1 TTS engine in linux platform

I use two kinds of TTS engine in my PC, Festival and Espeak. Festival provide a interactive interface with lisp like syntax. Espeak support more language voice. Of course there are another TTS engines in linux platform, I just have a little experience in above two.

2 The simple way to use Festival and Espeak

# festival read text from stdin
echo "hello world" | festival --tts
# festival read text from file
festival --tts filename

espeak "hello world"

# espeak speak chinese
espeak -v Mandarin "你好"  

3 Why TTS mode?

There are already have a festival.el project provided a emacs cmd interface to Festival. But I think why make a tts-mode which can provide a pretty view in emacs. That maybe as cool as Sheldon.

T.V. Raman also make Emacs-speak(Emacspeak) for blind or visual impaired person, Emacs-speak is much great, but I met some trouble during install it. And I also found Emacs-speak's recommended IBM TTS engine do not open up now. In a word, Emacs-speak is so huge and to install it is not a easy job.


The reason to make tts-mode:
  1. make something funny.
  2. have bad experience with emacs-speak. 

4 How to use TTS mode?

TTS mode use ewoc package to construct a pretty view.

Install this package is really simple. Remember install Festival and Espeak first.
Then, download the source code, I upload the source into a repository in github – tts-mode.

Add following line into you emacs init file.

(add-to-list 'load-path "path/to/tts-mode/dir")
(require 'tts) 

After install the package, Following command is the used to enter tts-mode, and change TTS engine.
 
# create a new buffer and enter tts-mode
M-x  tts
# choice different voise
M-x tts-voice  

Maybe I should make it to read my email or new messages.
Wow! enjoy it, have fun!

Comments

Popular posts from this blog

Bluedroid stack in android

How to setup a NAT server?

Network programming in elisp