LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 01: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, 01:59 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
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, 09: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, 09:50 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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 09:59 AM.
 
Old 05-13-2013, 10: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, 12:33 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
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



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 03:54 AM
[SOLVED] How to read content of .gz file without extracting it anywhere, not even STDOUT! pawan613 Linux - General 15 09-12-2011 12:21 AM
Seeking Distro with TTS support, where by keyboard shortcut reads selected text aloud cmmagid Linux - Software 1 09-18-2010 10:30 PM
How to redirect standard stdout to multi stdout ( Bash )? john.daker Programming 4 11-03-2008 11:20 PM
MAKING TOTEM PLAYER READ FROM stdout muskvar Linux - General 10 10-10-2007 02:15 PM

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

All times are GMT -5. The time now is 12:10 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
Open Source Consulting | Domain Registration