Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOUND] speechd lets your Computer speak
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
mark
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jun 2002
Posts: 119

PostPosted: Sat Aug 30, 2003 9:30 pm    Post subject: Reply with quote

I find it useful to provide audible confirmation of when a task completes.

eg

emerge -u world && echo 'emerge complete' > /dev/speech

Strangely when I add an echo comand to the sylpheed-claws preferences to notify me when I have mail it ignores redirection to /dev/speech and sends it to the console.

Another problem is when I create a .festivalrc file and add this

(set! voice_default 'voice_mwm_diphone)

I get this

# echo "(SayText \"Incoming\")" | festival
SIOD ERROR: unbound variable : us2_mbrola
closing a file left open: /usr/lib/festival/init.scm
festival: fatal error exiting.
If I use

echo 'hello world' > /dev/speech

I get the standard voice.

Mark
_________________
Regards

Mark
Back to top
View user's profile Send private message
brazilian_joe
Tux's lil' helper
Tux's lil' helper


Joined: 14 Mar 2003
Posts: 99

PostPosted: Wed Sep 03, 2003 4:25 pm    Post subject: Reply with quote

OK, my machine speaks now.
How can I make it sing, or burp, or laugh an evil laughter, or speak drunken, or sigh, or...
???
Back to top
View user's profile Send private message
kronon
Apprentice
Apprentice


Joined: 11 Aug 2003
Posts: 212
Location: NL

PostPosted: Sat Sep 06, 2003 8:13 pm    Post subject: Reply with quote

Hi just wanted to post that I have a standar femal voice if I do cat "blaat" > /dev/speech

This what I did.

I did all the things sugested at the howto.
Then I close speechd end festival
I started speechd with bash# speechd -V 2
And I got a standard female voice (I don't have to do de festival thing)
Yeahaa....

I gues the program reconfigures after gettin a -V option, so when I change the default and did the -V option it took the new default as it's own default.

8) btw, I think it can be handy from time to time to put this in the syslog script

*.(what every you want to know) /dev/speech

it will speak out all the message you want to know kewl 8)
Back to top
View user's profile Send private message
hardskin1
Tux's lil' helper
Tux's lil' helper


Joined: 08 Oct 2003
Posts: 82

PostPosted: Thu Nov 27, 2003 8:36 am    Post subject: Reply with quote

bassvandijk wrote:
I solved the problem!

http://www.cstr.ed.ac.uk/cgi-bin/lists.cgi?config=festival_faq&entry=arunning_festival/speed.html


I created siteinit.scm but festival continue play too fast. I use nforce2 audio. Someone can help me?
_________________
"Life 's a bitch / Life's a whore / Nothing less nothing more" Iced Earth

Se il destino ci e' avverso, peggio per lui.
Back to top
View user's profile Send private message
deadhead
n00b
n00b


Joined: 12 Nov 2002
Posts: 25

PostPosted: Sun Nov 30, 2003 4:34 am    Post subject: Re: This is really cool Reply with quote

edge3281 wrote:
This is really great!! I love this but... Is there anyway to get this to work applications in X. Like in mozilla... say highlighting text and rightclicking on it and having it read to you? Or in gaim saying somone logged on? If you know of anything like that let us know.

Thanks


I have gone crazy with kmail. When I get mail it says "You got some mail dude." By using the filters I have set up special notifications for different people and email lists. For example when I get email from gentoo-hardened it says "Gentoo Hardened List, man them some tough penguins." All you have to do is click Setting, Configure Filters. Then give it some filter criteria and set the filter action to "execute command". In the box beside that type in the command:

echo "What ever you want the notification to say." > /dev/speech

or

echo "That bone head is E mailing you again." > /dev/speech
Back to top
View user's profile Send private message
deadhead
n00b
n00b


Joined: 12 Nov 2002
Posts: 25

PostPosted: Sun Nov 30, 2003 4:44 am    Post subject: Reply with quote

hardskin1 wrote:
bassvandijk wrote:
I solved the problem!

http://www.cstr.ed.ac.uk/cgi-bin/lists.cgi?config=festival_faq&entry=arunning_festival/speed.html


I created siteinit.scm but festival continue play too fast. I use nforce2 audio. Someone can help me?


nano -w /usr/lib/festival/siteinit.scm
Code:

(Parameter.set 'Audio_Method 'Audio_Command)
(Parameter.set 'Audio_Command "sox -t raw -sw -r $SR $FILE -c2 -t ossdsp /dev/dsp speed 0.6 vol 1.9")


The only difference from the fix for speed in the link above is the addition of the speed effect for the sox command. I also increased the volume this way using the vol effect. Since I live in the southern US, slowing speechd down a little has made it easier for me to comprehend what it is saying.

Remember to restart your speechd for the changes to /usr/lib/festival/siteinit.scm have any effect. I've had pretty good luck with the /etc/init.d/speechd script that has been posted here.

/etc/init.d/speechd stop
/etc/init.d/speechd start
Back to top
View user's profile Send private message
deadhead
n00b
n00b


Joined: 12 Nov 2002
Posts: 25

PostPosted: Sun Nov 30, 2003 5:49 am    Post subject: Reply with quote

I use this php program to make listening to large text files more listenable with speechd. All it does is read the file in and remove all carriage returns and line feeds. Then it rewrites the file with one sentence per line. After that it copies the temporary file to /dev/speech. The temporary file is then deleted.

I found that speechd would halt at the end of a line with CR/LF and made it sound unnatural. Forcing sentences onto the same line helps this out. Sentences that end in other punctuation than "." will get thrown onto the last line ending in a "."

Who needs to buy audio books when I can go to the Gutenburg Project site and listen to it with speechd.

Heres my php program which I call txt2speechd.php
Example usage:

./txt2speechd.php file=anthem.txt

Code:

#!/usr/bin/php
<?
get_commandline();
$input = $file;
$output = $input.".festival";
$handle = fopen ($input, "r");
$contents = fread ($handle, filesize ($input));
fclose ($handle);
$contents = str_replace("\n"," ",$contents);
$contents = str_replace("\r"," ",$contents);
$lines = explode(".",$contents);
$handle = fopen($output,"w");
for ($i=0; $i < count($lines); $i++){
        fputs($handle,$lines[$i].".\n");
}
fclose ($handle);
system("cp $output /dev/speech");
system("rm -rf $output");
function get_commandline()
{
  global $HTTP_SERVER_VARS;

  for ($i=0; $i<$HTTP_SERVER_VARS['argc']; $i++)
  {
   $my_args = array();
   if (ereg("(.*)=(.*)", $HTTP_SERVER_VARS['argv'][$i], $my_args))
   {
     $GLOBALS[$my_args[1]] = $my_args[2];
   }
  }
}
?>
Back to top
View user's profile Send private message
hardskin1
Tux's lil' helper
Tux's lil' helper


Joined: 08 Oct 2003
Posts: 82

PostPosted: Sun Nov 30, 2003 11:00 am    Post subject: Reply with quote

deadhead wrote:


Remember to restart your speechd for the changes to /usr/lib/festival/siteinit.scm have any effect. I've had pretty good luck with the /etc/init.d/speechd script that has been posted here.

/etc/init.d/speechd stop
/etc/init.d/speechd start


Problem resolved. I didn't restart speechd :oops:
_________________
"Life 's a bitch / Life's a whore / Nothing less nothing more" Iced Earth

Se il destino ci e' avverso, peggio per lui.
Back to top
View user's profile Send private message
snakattak3
Guru
Guru


Joined: 11 Dec 2002
Posts: 468
Location: Seattle

PostPosted: Fri Feb 20, 2004 4:02 am    Post subject: Reply with quote

herring wrote:
carrett wrote:
hey, this is awesome. when i do: echo "Hello world" > /dev/speech
the system just sits there, no sound comes out and i have to ctl-C to stop the command. however, echo "Hello world" | festival --tts -
works perfectly, anybody know how to make the device work?


Hi !
Had this problem myself.
Examining /var/log/speechd (EDIT: and festival --server), I found festival was rejecting my localhost client. Reason was, localhost was not named localhost, but gentoo :-)

However, making a /root/.festivalrc
containing

Code:
(set! server_access_list '("gentoo"))


festival happily accepted my localhostclient, and finally piping to /dev/speech worked as expected

EDIT: This was probably a /etc/hosts issue (see Chris Finch post above)
http://www.speechio.org/speechio.faq.html

Awesome!!! Thanks for posting this, it was a broken /etc/hosts file. Thanks again.
_________________
Ban Reality TV!
Adopt an Unanswered Post
Back to top
View user's profile Send private message
seppe
Guru
Guru


Joined: 01 Sep 2003
Posts: 431
Location: Hove, Antwerp, Belgium

PostPosted: Sat Mar 06, 2004 3:00 pm    Post subject: Reply with quote

Hey, I wrote a small script to say how many updates are waiting. It should work, although I haven't tested it yet with /dev/speech (speechd is still compiling ;))

So you could put this script in /etc/cron.daily (make sure u chmodded it +x if you do so!) or make a init script to launch it. Be aware that emerge sync takes some time (15 minutes at my machine) and that it takes some bandwith from the sync servers (so don't run it more than once a day please)

Code:

#!/bin/sh
#
# Say updates
#
# This scripts pretends to emerge the world, and outputs the number
# of system updates to /dev/speech

emerge sync
x=`emerge -pu --deep world | grep "\[" | wc -l`
if [ $x -eq 0 ] ; then
   echo Your system is up to date > /dev/speech;
else
   echo There are $x updates waiting to be emerged > /dev/speech;
fi


edit: I have made another version which starts to update when there are updates
Code:

#!/bin/sh
#
# Update
#
# This scripts checks for updates. If there are no updates, nothing is gonna happen
# But if there are updates, this script will update your world

emerge sync
x=`emerge -pu --deep world | grep "\[" | wc -l`
if [ $x -eq 0 ] ; then
   echo Your system is up to date > /dev/speech;
else
   echo There are $x updates > /dev/speech;
   echo I'm now updating your system > /dev/speech
   emerge -u --deep world && echo emerge complete, your system is up to date > /dev/speech
fi

note: I haven't tested this last one at all.
_________________
nitro-sources, because between stable and experimental there exists only speed

Latest release I made: 2.6.13.2-nitro1
Back to top
View user's profile Send private message
Belial`
n00b
n00b


Joined: 04 Jan 2004
Posts: 23
Location: Beveren, Belgium

PostPosted: Tue Jun 15, 2004 2:24 pm    Post subject: xmms and speechd Reply with quote

It seems that it's possible to use festival when xmms is playing, because I've read threads where people ask how to increase the speech volume.
But my problem is that whenever I try to use speech when xmms is playing, I get this error:
Code:
bash-2.05b$ echo \(SayText \"Hello World\"\) | festival
-=-=-=-=-=- EST Warning -=-=-=-=-=-
Linux: failed to write to buffer (sr=16000)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

everything works perfectly when xmms is stopped.
Does anyone know what I can do about it? Because I have no clue...
Back to top
View user's profile Send private message
mr.twemlow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2003
Posts: 90
Location: Illinois

PostPosted: Fri Jul 16, 2004 6:07 pm    Post subject: Reply with quote

As far as I know festival can't use alsa without a bunch of trouble. I've read threads on people using software mixing to get anything to run in alsa, and that would be the only way that I know of. *Sigh* I wish...

Anyone know?
_________________
Get Gentoo icons: http://boxturtleme.2ya.com/gentoo-icons.xml

Gentium--A typeface for the nations: https://forums.gentoo.org/viewtopic.php?p=1351563
Back to top
View user's profile Send private message
iplayfast
l33t
l33t


Joined: 08 Jul 2002
Posts: 642
Location: Cambridge On,CA

PostPosted: Fri Jul 16, 2004 7:51 pm    Post subject: Reply with quote

I'm using kernel 2.6 something and I've been using festival with alsa for over a year now without problems. I can't remember doing anything special in it's config.

Also it works fine with xmms. I usually use it under KDE.

(I guess this isn't really helpful to you except to let you know that it can be done)
Back to top
View user's profile Send private message
mr.twemlow
Tux's lil' helper
Tux's lil' helper


Joined: 12 Nov 2003
Posts: 90
Location: Illinois

PostPosted: Fri Jul 16, 2004 7:57 pm    Post subject: Reply with quote

You sure it's with alsa? Because I *know* that I use alsa output on xmms so that I can play music and have gaim play sounds. And festival won't do anything until after music has been stopped.
_________________
Get Gentoo icons: http://boxturtleme.2ya.com/gentoo-icons.xml

Gentium--A typeface for the nations: https://forums.gentoo.org/viewtopic.php?p=1351563
Back to top
View user's profile Send private message
iplayfast
l33t
l33t


Joined: 08 Jul 2002
Posts: 642
Location: Cambridge On,CA

PostPosted: Sun Jul 18, 2004 4:45 am    Post subject: Reply with quote

Yes I'm fairly certain. kde has alsa selected, alsa was selected in the kernel compile, I haven't used anything else for quite sometime.
Back to top
View user's profile Send private message
Cornfed
n00b
n00b


Joined: 22 Dec 2003
Posts: 59

PostPosted: Wed Jul 28, 2004 12:36 pm    Post subject: Reply with quote

I ran into a compile problem with an error that said "cannot find -ltermcap". This was fixed by emerging the package "libtermcap-comat". Once that was done, Festival compiled just fine.
Back to top
View user's profile Send private message
darkangael
Tux's lil' helper
Tux's lil' helper


Joined: 04 Jul 2003
Posts: 132

PostPosted: Sun Aug 15, 2004 10:29 am    Post subject: Re: [SOUND] speechd lets your Computer speak Reply with quote

Quote:
11. Test female:
Code:
# echo "(SayText \"Hello World\")" | festival

(Note: #echo "Hello World" > /dev/speech will not work for female voice!)

That's it so far...

See ya, Tobi


If you edit the /etc/festival/server.scm and uncomment (or add)
Code:
(voice_us1_mbrola)

then restart the festival server it will work in the dev speech as well.
Back to top
View user's profile Send private message
isnogood
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2003
Posts: 96

PostPosted: Sun Aug 15, 2004 11:40 am    Post subject: Reply with quote

Hehe - pipe the output of sex thru festival and then have it make a .wav or .mp3 and attach it as sig to your emails.
Great way to get in trouble with business emails.
The only way to make things worse is getting the sex output translated into any other language by google first.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1337
Location: Mississippi USA

PostPosted: Thu Aug 26, 2004 1:12 pm    Post subject: Reply with quote

OK. I just installed festival but this is really cool. I just watched a special on the Science channel with Stephen Hawkin. This is what he uses. It sounds exactly like that speech thing he uses.

I just wish I was as smart as he is. :roll: 8O

I may install some more stuff later. I hadn't figured out how to make other voices yet. I got mbola thing installed. Oh well.

So kewl!!!

I'll paste this in too. :wink:

Later

:D :D :D :D
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
9TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1337
Location: Mississippi USA

PostPosted: Thu Aug 26, 2004 1:46 pm    Post subject: Reply with quote

Hmmm. I want this thing to talk when I get new mail. I am using Mozilla mail. Any idea how to do this?

I wrote a little script thing and it works, first time for anything, but Mozilla only wants .wav files.

Thanks for any ideas.

:D :D :D :D
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
9TBs of hard drive space using LVM
Cooler Master HAF-932 Case
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Aug 26, 2004 8:18 pm    Post subject: Reply with quote

could someone explain how I can change the voice easily whith the actual version of speechd?

thx
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Thu Aug 26, 2004 8:21 pm    Post subject: Reply with quote

and do i need fetival or speechd? whats the differnece?
Do I need both programms running?
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Fri Aug 27, 2004 2:54 pm    Post subject: Reply with quote

Could anybody give me a short explaination how to change the default voice?

Last edited by Phlogiston on Sun Aug 29, 2004 3:47 pm; edited 1 time in total
Back to top
View user's profile Send private message
asph
l33t
l33t


Joined: 25 Aug 2003
Posts: 738
Location: Barcelona, Spain

PostPosted: Sat Aug 28, 2004 10:13 am    Post subject: Reply with quote

i did all the steps but it doesnt seem to work.. festival and speechd starts with no errors on startup, but when i echo something to /dev/speech nothing happens.. i use ALSA, gentoo-dev-sources and udev (with tarball), and sound works fine for other apps

anyone has the same problem?

*edit* finally i fixed it, it works very fine.. till i start kde (2 arts) :/ *edit*
_________________
gentoo sex is updatedb; locate; talk; date; cd; strip; look; touch; finger; unzip; uptime; gawk; head; emerge --oneshot condom; mount; fsck; gasp; more; yes; yes; yes; more; umount; emerge -C condom; make clean; sleep
Back to top
View user's profile Send private message
omega_cubed
n00b
n00b


Joined: 14 Nov 2003
Posts: 5
Location: Princeton, NJ

PostPosted: Fri Sep 10, 2004 6:10 am    Post subject: Reply with quote

nastassja wrote:
i did all the steps but it doesnt seem to work.. festival and speechd starts with no errors on startup, but when i echo something to /dev/speech nothing happens.. i use ALSA, gentoo-dev-sources and udev (with tarball), and sound works fine for other apps

anyone has the same problem?

*edit* finally i fixed it, it works very fine.. till i start kde (2 arts) :/ *edit*


Hum, I have the same problem. Can you tell me how it was fixed?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 5 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum