Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 30 Jul 2014, 13:39
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Chatterbox - STT / TTS / TTA project. Part 1
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [15 Posts]  
Author Message
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Fri 11 Oct 2013, 17:29    Post subject:  Chatterbox - STT / TTS / TTA project. Part 1
Subject description: Make Puppy speak, listen and act.
 

Chatterbox STT / TTS / TTA project
(Speech-To-Text / Text-To-Speech / Text-To-Action)

My “chatterbox” project is intended to be a low-level test bed for equipping a Puppy with the scripts and programs necessary to allow the Puppy to speak to the user, listen to the user, and act upon instructions.

(At this stage I will be working with English language only).

There are many other threads detailing efforts to make Puppy accessible to vision impaired users, but I do not intend to try and duplicate a large-scale project of that nature. Instead I want to begin a simple project to achieve some very basic goals. Hopefully, if those goals are achieved, it will act as a building block for me to expand the functionality. My goals for this project are as follows:

1) Have Puppy speak to me once it has booted. eg: “Welcome to Puppy, would you like me to play your music collection randomly?”

2) Have Puppy listen to my response and create a text file which accurately expressess my response eg: “Yes”

3) Have Puppy act on that text file and play through the contents of my music folder randomly (I’m going to use Peasy_mp3 player to handle the random play part of it, so the key is finding a program that monitors the text file and starts Peasy when required).

These seem easy goals to achieve. However there are several factors to consider:
- There are several programs / scripts available to do each of these tasks, but they vary in quality, features and ease of use.
- Not every puppy can use every program / script that is available.
- Speech recognition is inherently variable and what works for me may not work for others.
- There are many possible ways to link these functions together and I do not want to get locked into a dead end - I want other users to feel free to suggest alternative programs, scripts and concepts linked in whatever way works successfully to achieve the basic 3 goals.

I have divided this project into 3 parts as I consider that each of the 3 functions should be treated as distinct - in order that future expansions of this functionality can be achieved without compromising the basics. Therefore there are 3 Chatterbox threads as follows:

Part 1 - Puppy asks me a question after booting (ie: this thread)
Part 2 - Puppy listens to my response
http://www.murga-linux.com/puppy/viewtopic.php?p=729969
Part 3 - Puppy reads the text file and takes action to start my music.
http://www.murga-linux.com/puppy/viewtopic.php?p=729975

If I can get my Puppy chatting to me, and listening to me, even for basic functions, I will feel I have made progress.

(Obviously in the long term I will be wanting Puppy to ask me about other functions rather than playing music, but this project is just to get me started...)

Original thread by H4LF82 that got me thinking about this topic:
http://murga-linux.com/puppy/viewtopic.php?t=86471
.

Last edited by greengeek on Sun 13 Oct 2013, 19:43; edited 5 times in total
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Fri 11 Oct 2013, 17:30    Post subject:  

reserved
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Fri 11 Oct 2013, 17:30    Post subject:  

reserved
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Fri 11 Oct 2013, 17:30    Post subject:  

reserved
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Fri 11 Oct 2013, 17:31    Post subject:  

reserved
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Fri 11 Oct 2013, 18:45    Post subject:  

The first method I have tried is to record a .wav file (using mhwaveedit) with the appropriate question ("Welcome to Puppy, would you like me to play your music collection randomly"). I called this Qplay.wav and placed it into /root.

Then I write a script to use aplay to play the .wav, and place that script in /root/startup.
Code:
#!/bin/bash
sleep 3
aplay /root/Qplay.wav &


Works fine but I probably want to do the same thing using an ogg or mp3 instead of a wav, (so maybe there is an mp3 alternative to aplay?). I also want to be able to produce that sound bite without direct recording - ie: I want to be able to produce the wav or mp3 using a program that turns text into speech. (I tried flite but for some reason it will only produce mp3s for me - I can't get the wav side of it working yet)

The other option is to work direct from a text file and have something like espeak driven from the command line and just have that script in /root/startup. (I will give that a go once I have read the documentation...)
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 1795
Location: South Australia

PostPosted: Fri 11 Oct 2013, 19:20    Post subject:  

arecord will make a .wav file
lame will convert the .wav file to .mp3
mpg123 will play the .mp3 file

Puppy normally has the three files above included.

Some useful but old info below:
http://www.faqs.org/docs/Linux-HOWTO/MP3-HOWTO.html

I have used a command line mp3 recorder in the past but I can't remember it's name.

_________________
Puppy Software <-> Distros <-> Puppy Linux Tips

Last edited by smokey01 on Sat 12 Oct 2013, 17:13; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
H4LF82


Joined: 02 Oct 2012
Posts: 124

PostPosted: Fri 11 Oct 2013, 19:38    Post subject:  

ok the TTS part is already done for us.

I have had lots of success with espeak on Lucid

http://www.murga-linux.com/puppy/viewtopic.php?t=25046

Check it out!
Put a script in the /root/startup directory named Qplay and fill it with the following code...

Code:

#!/bin/sh

espeak -f /path/to/Qplay.txt

exit


Save it.

Smile

_________________
"The wise know their weakness too well to assume infallibility; and he who knows most, knows best how little he knows." - Thomas Jefferson
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Sat 12 Oct 2013, 13:31    Post subject:  

Yes, that espeak method seems to work quite well. Did you try any other voices?
Back to top
View user's profile Send private message 
H4LF82


Joined: 02 Oct 2012
Posts: 124

PostPosted: Sat 12 Oct 2013, 13:41    Post subject:  

i have not tried other voices yet.
_________________
"The wise know their weakness too well to assume infallibility; and he who knows most, knows best how little he knows." - Thomas Jefferson
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Sat 12 Oct 2013, 14:43    Post subject:  

smokey01 wrote:
arecord will make a .wav file
lame will convert the .wav file to .mp3
mpg123 will play the .mp3 file
Puppy normally has the three files above included.
Thanks Smokey. I seem to lack the mpg123 in Pemasu's Upup3992 so will try some other pups aswell.
Back to top
View user's profile Send private message 
smokey01


Joined: 30 Dec 2006
Posts: 1795
Location: South Australia

PostPosted: Sat 12 Oct 2013, 17:36    Post subject:  

greengeek, madplay will also play mp3 files and is generally part of most Puppy distros.

Home page for mpg123 if you want it.
http://mpg123.org/

Download binary or source:
http://mpg123.org/download.shtml

_________________
Puppy Software <-> Distros <-> Puppy Linux Tips
Back to top
View user's profile Send private message Visit poster's website 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Sun 13 Oct 2013, 02:32    Post subject:  

Thanks - yep, madplay does the trick on Upup. Definitely a space saver to be able to use mp3 rather than wav.
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2298
Location: Heart of Texas

PostPosted: Thu 17 Oct 2013, 09:52    Post subject: Video of talking computer helping disabled  

http://www.ksat.com/news/ut-medicine-takes-onestop-approach-to-treating-als/-/478452/22359598/-/qmbeonz/-/index.html


After some phone calls and replies they have posted the interview of the main doctor I've spoken with / short demo-ed the puppylinux offerings.

They show the commercial 'pricy' tools to support ALS but low cost and free would help the other 95% of people without ALS.

WHY I'M I HAVING PROBLEMS WITH BLANK MSG, URLS, CAN SOME MOD TAKE ME OFF THE WATCH LIST!!!!
Back to top
View user's profile Send private message 
greengeek

Joined: 20 Jul 2010
Posts: 2407
Location: New Zealand

PostPosted: Tue 29 Oct 2013, 14:41    Post subject:  

Just a reminder to myself to do some more work on flite and to investigate svox-pico too
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [15 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0756s ][ Queries: 11 (0.0040s) ][ GZIP on ]