mfixman / roogle-darwin

Automatically exported from code.google.com/p/roogle-darwin
0 stars 0 forks source link

Make darwin talk #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
User story:
Darwin should talk back about his status

Purpose of code to be implemented or task to be completed:
  * upgrade Darwin to a supported version of Ubuntu (preferably a long term release)
  * install TTS (maybe festival?) so darwin can talk
  * provide sample code to make him talk using festival

Original issue reported on code.google.com by gina.c.c...@gmail.com on 5 Mar 2012 at 2:21

GoogleCodeExporter commented 9 years ago
According to Darwin's Framework he currently has a Motion and Vision Module, 
but not a Language Module.
http://darwin-op.springnote.com/pages/6862673

Once you've got festival or another TTS set up on Darwin here is a quick and 
dirty way to get him to talk.

You can execute the TTS via bash inside of CPP using some similar this code 
which comes from the CollocationsCollector (a project wrapping TTS and a web 
view  in CPP and the QT framework).

   #include <fstream>

    string echoToText = "echo '";
    string toRead = "Hello world, I'm Darwin O P.";
    echoToText.append(toRead);
    echoToText.append("' > /home/darwin/TTS/hello.txt");
    system(echoToText.toAscii().constData());
    system("text2wave /home/darwin/TTS/hello.txt -o /home/darwin/TTS/hello.wav");
    system("lame -V2 /home/darwin/TTS/hello.wav /home/darwin/TTS/hello.mp3");
    system("mpg123 /home/darwin/TTS/hello.mp3");

Original comment by gina.c.c...@gmail.com on 10 Mar 2012 at 6:59