[nodejs] [ANN] say.js - TTS (text to speech) for node.js. send text from node.js to your speakers.

725 views
Skip to first unread message

Marak Squires

unread,
Jun 11, 2010, 8:16:32 AM6/11/10
to ny...@googlegroups.com, nod...@googlegroups.com
hello internet friends!

i've released a really simple text to speech module for node.js. (only mac os is currently supported)


you can make calls directly from node that look like this and node will talk to you >.<

    var say = require('./say');
    say.speak('sup dog?');

    // set a custom voice
    say.voice('Princess');
    say.speak('hello there!');

Aaron Heckmann

unread,
Jun 11, 2010, 8:22:40 AM6/11/10
to nod...@googlegroups.com
cool

--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.



--
Aaron
http://clickdummy.net

Marak Squires

unread,
Jun 11, 2010, 11:45:50 AM6/11/10
to nod...@googlegroups.com, ny...@googlegroups.com
LOL!

Chris Williams made a module with say.js that will read your twitter messages

Federico Romero

unread,
Jun 11, 2010, 9:24:35 AM6/11/10
to nod...@googlegroups.com
I tried it, it worked but ended saying v Alex. Changing the order of commands fixed it.

var commands = ['-v', person, text];

Correa Diego

unread,
Jun 11, 2010, 12:07:55 PM6/11/10
to nod...@googlegroups.com
¿Does it have language selection?

2010/6/11 Aaron Heckmann <aaron.h...@gmail.com>



--
http://labormedia.cl/algoritmia

Marak Squires

unread,
Jun 11, 2010, 12:18:40 PM6/11/10
to nod...@googlegroups.com
i dunno, what happens if you do 

say.speak('yo quero tacos por favor');

lol

Andrew Lunny

unread,
Jun 12, 2010, 12:01:42 PM6/12/10
to nod...@googlegroups.com
I've forked say.js so that whatever stupid language you enter, you can
get genuine English back out; changes here

http://github.com/alunny/say.js

--
Andrew Lunny
Software Developer, Nitobi
604 685 9287
blogs.nitobi.com/andrew

Marak Squires

unread,
Jun 12, 2010, 12:06:55 PM6/12/10
to nod...@googlegroups.com
lolwut! im gonna play with that patch right now and apply if it works. good stuff man!

Marak Squires

unread,
Jun 13, 2010, 12:01:23 AM6/13/10
to nod...@googlegroups.com
hey andrew -

i added full text translation support to say.js using some of your code. http://github.com/marak/say.js

i setup a demo where you can ask for tacos in spanish and it will translate it.

ill also be releasing a separate module later tonight that just does translation, im listing you as an author!

huzaah! javascript party!

Marak Squires

unread,
Jun 13, 2010, 12:30:10 AM6/13/10
to nodejs
thanks, fixed.

On Jun 11, 9:24 am, Federico Romero <federom...@gmail.com> wrote:
> I tried it, it worked but ended saying *v Alex*. Changing the order of
> commands fixed it.
>
> var commands = ['-v', person, text];
>
> On Fri, Jun 11, 2010 at 9:22 AM, Aaron Heckmann <aaron.heckm...@gmail.com>wrote:
>
>
>
> > cool
>
> > On Fri, Jun 11, 2010 at 8:16 AM, Marak Squires <marak.squi...@gmail.com>wrote:
>
> >> hello internet friends!
>
> >> i've released a really simple text to speech module for node.js. (only mac
> >> os is currently supported)
>
> >>http://github.com/Marak/say.js
>
> >> you can make calls directly from node that look like this and node will
> >> talk to you >.<
>
> >>     var say = require('./say');
> >>     say.speak('sup dog?');
>
> >>     // set a custom voice
> >>     say.voice('Princess');
> >>     say.speak('hello there!');
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "nodejs" group.
> >> To post to this group, send email to nod...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/nodejs?hl=en.
>
> > --
> > Aaron
> >http://clickdummy.net
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "nodejs" group.
> > To post to this group, send email to nod...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
> > .

Marak Squires

unread,
Jun 13, 2010, 3:01:43 AM6/13/10
to nodejs
so check it out! 

i've taken alunny's code and wrapped it up with a nice API into a new library, translate.js!

translate.js - translate text from one language to another on node.js and the browser. 30+ languages supported, simple as cake.


    var translate = require('./translate');

    // set the input language
    translate.input('English'); //

    // set the output language
    translate.output('Spanish');

    // note: if you don't specify an input or output language, translate.js will attempt to autodetect your input and set your output to English
    translate.text('yo quero tacos por favor', function(text){
      sys.puts(text); // outputs : i want tacos please
    }); 

To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.

Jan Schütze

unread,
Jun 13, 2010, 8:33:20 AM6/13/10
to nod...@googlegroups.com
Hey marak,

the translate.js stuff looks good.

I would prefer if you receive an object on which you can set the input
and output language. Currently you set this right on the required
module, thus it will be global. This is difficult in case you want to
translate to different languages in different requests at the same
time.

Kind regards,
Jan

--

http://dracoblue.net

Andrew Lunny

unread,
Jun 13, 2010, 11:13:10 AM6/13/10
to nod...@googlegroups.com
Nice work Marak - you're right, it makes more sense to flesh out the
API and break translation into a separate module.

Now all we need is a speech to text module.

--

Marak Squires

unread,
Jun 13, 2010, 2:22:36 PM6/13/10
to nod...@googlegroups.com
Thanks Jan!

I think you have a good point. If you want to fork and change I'd be very happy to accept the pull request. If not, it might be a little while before I can get around to changing it myself. 

-Marak

2010/6/13 Jan Schütze <Ja...@dracoblue.de>

816...@gmail.com

unread,
Jun 13, 2010, 5:03:20 PM6/13/10
to nodejs
There are an good text-to-speech engine for linux - festival,
my old bash script for ubuntu:

#!/bin/bash
if [ `which festival` ]
then
echo "(Parameter.set 'Audio_Command \"paplay \$FILE\")
(Parameter.set 'Audio_Method 'Audio_Command)
(Parameter.set 'Audio_Required_Format 'snd)" > $HOME/.festivalrc
echo $*|festival --tts
else
echo 'Please install festival: sudo apt-get install festival festvox-
ru';
fi

Marak Squires

unread,
Jun 13, 2010, 5:06:38 PM6/13/10
to nod...@googlegroups.com
oleg - 

maybe we could wrap this in a node childprocess and attempt to install it if the ENV checks out?

im totally down for making the TTS engine pluggable, would be easy to implement in the library.

-marak


--
Reply all
Reply to author
Forward
0 new messages