LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-13-2013, 02:40 AM   #1
jmite
Member
 
Registered: Jun 2008
Distribution: Ubuntu
Posts: 266

Rep: Reputation: 36
How to make everything on stdout be read aloud (using eSpeak)?


I've got the eSpeak TTS system up and running, and I like it quite a bit.

I'm wondering, is there a way to pipe EVERYTHING that gets printed to STDOUT to espeak? I'm trying to set up a system without a monitor that would speak the terminal output to me.

I've found the brltty-espeak package, but I have no idea how to set it up.
 
Old 05-13-2013, 02:59 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,867

Rep: Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905
I do not know this eSpeak system, but I know every terminal has its own stdout and probably you do not really need all the stdouts, just some specific one. The normal approach is to attach TTS to a given terminal.
Based on the documentation you need to redirect stdout to espeak
 
Old 05-13-2013, 10:41 AM   #3
jmite
Member
 
Registered: Jun 2008
Distribution: Ubuntu
Posts: 266

Original Poster
Rep: Reputation: 36
Okay then, how do I redirect stdout to espeak? It seems to take normal pipe input like any other program, but how do I direct all of stdout on a terminal to espeak?
 
Old 05-13-2013, 10:50 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,161

Rep: Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889
Code:
echo hello world | espeak
i tired this but it is kinda buggy:
Code:
cat  /dev/pts/1 | espeak

Last edited by schneidz; 05-13-2013 at 10:59 AM.
 
Old 05-13-2013, 11:26 AM   #5
jmite
Member
 
Registered: Jun 2008
Distribution: Ubuntu
Posts: 266

Original Poster
Rep: Reputation: 36
Is there a way to pipe every command to espeak without having to manually type it each time? My goal is to have a computer without a monitor which will read everything on stdout to me.
 
Old 05-14-2013, 01:33 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,867

Rep: Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905Reputation: 2905
yes, there is a way (several ways). Actually I have no espeak, so I cannot test it, but in general it should work:
Code:
#you can create a fifo
ESPEAK_FIFO=/tmp/espeak_fifo
mkfifo $ESPEAK_FIFO
# start espeak in the background
espeak -f $ESPEAK_FIFO &
# or use tee to keep text on display too
cat $ESPEAK_FIFO | tee /dev/tty | espeak
# redirect stdout to fifo
exec >$ESPEAK_FIFO
this small script should be sourced in your terminal and afterwards everything displayed will be sent to espeak.
 
  


Reply

Tags
audio, espeak, speech, tts


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to read from the stderr and stdout buffer? omega341991 Linux - Newbie 1 06-08-2012 04:54 AM
[SOLVED] How to read content of .gz file without extracting it anywhere, not even STDOUT! pawan613 Linux - General 15 09-12-2011 01:21 AM
Seeking Distro with TTS support, where by keyboard shortcut reads selected text aloud cmmagid Linux - Software 1 09-18-2010 11:30 PM
How to redirect standard stdout to multi stdout ( Bash )? john.daker Programming 4 11-04-2008 12:20 AM
MAKING TOTEM PLAYER READ FROM stdout muskvar Linux - General 10 10-10-2007 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration