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 26 Nov 2014, 07:39
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Chatterbox - STT / TTS / TTA project. Part 3
Moderators: Flash, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
greengeek

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

PostPosted: Fri 11 Oct 2013, 17:46    Post_subject:  Chatterbox - STT / TTS / TTA project. Part 3
Sub_title: Make Puppy act upon spoken commands.
 

Part 3 of my "chatterbox" project is aimed at getting a Puppy to monitor the text file created in Part 2 (in response to my speech) and to take action based upon that text file. (In this case if the text file says "Yes" then I want a program / script to start Peasymp3 player and play the contents of my music folder)

Part 1 and chatterbox project description here:
http://www.murga-linux.com/puppy/viewtopic.php?t=89258

Part 2 (monitor what I speak into the microphone) here:
http://www.murga-linux.com/puppy/viewtopic.php?p=729969
.

Edited_times_total
Back to top
View user's profile Send_private_message 
greengeek

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

PostPosted: Fri 11 Oct 2013, 17:46    Post_subject:  

reserved
Back to top
View user's profile Send_private_message 
greengeek

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

PostPosted: Fri 11 Oct 2013, 17:46    Post_subject:  

reserved
Back to top
View user's profile Send_private_message 
greengeek

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

PostPosted: Fri 11 Oct 2013, 17:46    Post_subject:  

reserved
Back to top
View user's profile Send_private_message 
greengeek

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

PostPosted: Fri 11 Oct 2013, 17:47    Post_subject:  

reserved
Back to top
View user's profile Send_private_message 
H4LF82


Joined: 02 Oct 2012
Posts: 124

PostPosted: Fri 11 Oct 2013, 21:26    Post_subject:  

This part is easy. If part 1 is TTS and part 2 is STT, then part 3 must surely be about TTA (text-to-action). A computer is a big fat TTA machine thats only job in life is turning text into action... so I do not forsee any problems here. If you can get part 2 figured out, (YOU: "Computer, open firefox." COMPUTER: "computer open firefox" # exec firefox ) I am as happy as a retarded clam to help write the 1000 or so tiny 1, 2, &3 line bash scripts that will be necessary for all of the possible visually accessible options. I have become the short-bash-script-KING and I can write short bash scripts in my sleep.

Very Happy

_________________
"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: 2669
Location: New Zealand

PostPosted: Fri 11 Oct 2013, 22:10    Post_subject:  

I didn't mention part 4 yet ....ie: writing the menu structure that expands the functionality and ties it all together so that it does more than just play my music folder Smile

Part 2 is going to keep me busy for a while yet Cool

Glad you're on board with the scripting 'cos all I can do is copy and hack other peoples code...
Back to top
View user's profile Send_private_message 
greengeek

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

PostPosted: Sat 12 Oct 2013, 14:11    Post_subject:  

After Puppy asks the question "Would you like me to play your music collection randomly" and I answer "Yes", then the process which detects my answer will kick off a script which launches peasymp3autoplay as follows:

#!/bin/bash
peasymp3autoplay /path/to/Music

Peasymp3autoplay is a recently added part of rcrsn51's peasymp3 suite. It plays the Music folder (and subfolders) randomly and is available as the peasymp3_progs-4.3.pet from the first post here:

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

I've just tested this from the commandline and it works perfectly so it's just a question of how to trigger it from the voice response.
Back to top
View user's profile Send_private_message 
H4LF82


Joined: 02 Oct 2012
Posts: 124

PostPosted: Sat 12 Oct 2013, 14:16    Post_subject:  

if we are talking about playing wav files then id suggest using mplayer...

Quote:
mplayer /path/to/file.wav


mplayer is pretty standard equipment on puppy if im not mistaken... I know nothing about peasymp3 which is not to say i am opposed...simply that i know nothing about it.

perhaps the "plays the folder randomly" bit is the part that got your attention, but i would suggest that the ultimate end result is not to achieve random playing of X from some folder, but the specific action of playing X from X folder. If your goal is to expand this program to do something besides play random music, id leave the random part out and get really specific.

Specificity will be key as we go on and this monster grows. im jsut sayin...

_________________
"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: 2669
Location: New Zealand

PostPosted: Sat 12 Oct 2013, 14:37    Post_subject:  

Yes, I see your point - it's just that the "random play" thought was fresh in my mind because it is what I have spent the last month working on. Now that it's working successfully I thought the STT method was a great way to trigger it. (peasymp3 is a front end for mplayer anyway - and getting singleclick randomplay working was the end result I wanted).

My hope is that once this project successfully triggers my randomplay goal then it provides a proof-of-concept that can be extended to any other function (or hopefully clusters of functions...)
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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