Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Voice recognition with VRbot

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
5 postsPage 1 of 1
5 postsPage 1 of 1

Voice recognition with VRbot

Post by ozfiddler » Thu Nov 25, 2010 11:42 am

Post by ozfiddler
Thu Nov 25, 2010 11:42 am

This is my progress so far towards making a Robo that can have a 2-way conversation with me. I have managed to get the VRbot working and at the moment I am just using an LCD for responses.

I have an SP03 on order but I'm not sure whether I really understand this I2C business. I feel like I'm about two years behind everyone else on this forum! Oh well... at least there's a lot of great posts to keep me informed.

[url]
phpBB [media]
[/url]
This is my progress so far towards making a Robo that can have a 2-way conversation with me. I have managed to get the VRbot working and at the moment I am just using an LCD for responses.

I have an SP03 on order but I'm not sure whether I really understand this I2C business. I feel like I'm about two years behind everyone else on this forum! Oh well... at least there's a lot of great posts to keep me informed.

[url]
phpBB [media]
[/url]
ozfiddler
Savvy Roboteer
Savvy Roboteer
Posts: 93
Joined: Tue Oct 26, 2010 1:01 am

Post by Kelpy » Tue Nov 30, 2010 7:54 pm

Post by Kelpy
Tue Nov 30, 2010 7:54 pm

ozfiddler, I reckon that is really impressive, and if you are 2 years behind everyone, then I'm 10 :(
I haven't been able to "play" with my robo for a few weeks, but have got some free time coming up, and this (voice recognition) is one of the things to do on my list.
I don't suppose you'd care to share your code, would you? :wink:
ozfiddler, I reckon that is really impressive, and if you are 2 years behind everyone, then I'm 10 :(
I haven't been able to "play" with my robo for a few weeks, but have got some free time coming up, and this (voice recognition) is one of the things to do on my list.
I don't suppose you'd care to share your code, would you? :wink:
Kelpy
Savvy Roboteer
Savvy Roboteer
Posts: 45
Joined: Wed Jul 14, 2010 6:42 pm

Post by ozfiddler » Wed Dec 01, 2010 10:37 am

Post by ozfiddler
Wed Dec 01, 2010 10:37 am

Hi Kelpy, happy to pass on what I know but it really was quite easy - the VRbot does everything. When you download the GUI and connect it to Robo it installs a revised program automatically that does all of the included sets of commands straight out of the box (it even handled my Australian accent).

If you want to train up some new commands you just do that and then use the "generate code" function and it will make up a new program that includes the new set.

In my case it automatically generated a program that included this code that defines where the commands are:

Code: Select all
'Groups and Commands

CONST GROUP_0  = 0    '(Command count: 1)
CONST G0_ROBO                             = 0

CONST GROUP_1  = 1    '(Command count: 9)
CONST G1_STOP                             = 0
CONST G1_MOVE                             = 1
CONST G1_HANDS_UP                         = 2
CONST G1_ROLL                             = 3
CONST G1_TURN                             = 4
CONST G1_CLAP                             = 5
CONST G1_BATTERY                          = 6
CONST G1_HELLO                            = 7
CONST G1_HEADSTAND                        = 8

CONST GROUP_2  = 2    '(Command count: 4)
CONST G2_LEFT                             = 0
CONST G2_RIGHT                            = 1
CONST G2_FORWARD                          = 2
CONST G2_BACK                             = 3

CONST GROUP_3  = 3    '(Command count: 4)
CONST G3_LEFT                             = 0
CONST G3_RIGHT                            = 1
CONST G3_FORWARD                          = 2
CONST G3_BACK                             = 3

CONST GROUP_4  = 4    '(Command count: 3)
CONST G4_LEFT                             = 0
CONST G4_RIGHT                            = 1
CONST G4_AROUND                           = 2


Then you just need to edit the code a bit further down, where it says "'start Voice Recognition in current group". This is where you define what each group command will do. My programming is not very elegant but I used this for the above command set:

Code: Select all
'implement actions based on VRGROUP and VRCOMMAND
IF VRGROUP = GROUP_0 THEN ' Robo has recognised his name
   VRGROUP = GROUP_1 ' so activate command Group 1
   PRINT &HFE, &H01 ' clear LCD screen
   PRINT &HFE, &H80 ' move cursor top left
   PRINT "YES" ' Robo is ready for his orders
   VRBLINK = 1 ' blink LED to show he is waiting
   VRLED = 1 ' on
   GOTO MAIN
ENDIF

IF VRGROUP = GROUP_1 THEN ' Robo has received his next command

   IF VRCOMMAND = 1 THEN ' Consider MOVE as word 1 of Group 1
   VRGROUP = GROUP_2
   PRINT &HFE, &H01
   PRINT &HFE, &H80
   PRINT "MOVE WHICH WAY?"
       
   ELSEIF VRCOMMAND = 3 THEN ' Consider ROLL as word 3 of Group 1
   VRGROUP = GROUP_3
   PRINT &HFE, &H01
   PRINT &HFE, &H80
   PRINT "ROLL WHICH WAY?"
      
   ELSEIF VRCOMMAND = 4 THEN ' Consider TURN as word 4 of Group 1
   VRGROUP = GROUP_4
   PRINT &HFE, &H01
   PRINT &HFE, &H80
   PRINT "TURN WHICH WAY?"
   
   ELSE
   VRGROUP = GROUP_0 ' back to trigger
   VRBLINK = 0 'still
   VRLED = 1 'off
   ENDIF
   ON VRCOMMAND GOTO sleep,MAIN,hands_up,MAIN,MAIN,clap,battery,bow,K9
ENDIF

IF VRGROUP = GROUP_2 THEN
   VRGROUP = GROUP_0 ' back to trigger
   VRBLINK = 0 'still
   VRLED = 1 'off
   ON VRCOMMAND GOTO left_shift,right_shift,forward_move,backward_move
ENDIF

IF VRGROUP = GROUP_3 THEN
   VRGROUP = GROUP_0 ' back to trigger
   VRBLINK = 0 'still
   VRLED = 1 'off
   ON VRCOMMAND GOTO left_roll,right_roll,forward_roll,back_roll
ENDIF

IF VRGROUP = GROUP_4 THEN
   VRGROUP = GROUP_0 ' back to trigger
   VRBLINK = 0 'still
   VRLED = 1 'off
   ON VRCOMMAND GOTO left_turn,right_turn,turn_around
ENDIF

GOTO MAIN

'============================================


The "ON VRCOMMAND GOTO..." line just passes the program to command 0, 1, 2 ...etc of the group that is currently defined. I've used the subroutine name but you can also use k1, k2, k3 etc. It's probably kindergarten programming for most people but it took me a little while to get my head around it.

You might also want to look at this post on the VRbot forum:

http://www.veear.eu/Forums/tabid/236/forumid/8/threadid/44/scope/posts/Default.aspx

Anyway, let me know if you have problems.
Hi Kelpy, happy to pass on what I know but it really was quite easy - the VRbot does everything. When you download the GUI and connect it to Robo it installs a revised program automatically that does all of the included sets of commands straight out of the box (it even handled my Australian accent).

If you want to train up some new commands you just do that and then use the "generate code" function and it will make up a new program that includes the new set.

In my case it automatically generated a program that included this code that defines where the commands are:

Code: Select all
'Groups and Commands

CONST GROUP_0  = 0    '(Command count: 1)
CONST G0_ROBO                             = 0

CONST GROUP_1  = 1    '(Command count: 9)
CONST G1_STOP                             = 0
CONST G1_MOVE                             = 1
CONST G1_HANDS_UP                         = 2
CONST G1_ROLL                             = 3
CONST G1_TURN                             = 4
CONST G1_CLAP                             = 5
CONST G1_BATTERY                          = 6
CONST G1_HELLO                            = 7
CONST G1_HEADSTAND                        = 8

CONST GROUP_2  = 2    '(Command count: 4)
CONST G2_LEFT                             = 0
CONST G2_RIGHT                            = 1
CONST G2_FORWARD                          = 2
CONST G2_BACK                             = 3

CONST GROUP_3  = 3    '(Command count: 4)
CONST G3_LEFT                             = 0
CONST G3_RIGHT                            = 1
CONST G3_FORWARD                          = 2
CONST G3_BACK                             = 3

CONST GROUP_4  = 4    '(Command count: 3)
CONST G4_LEFT                             = 0
CONST G4_RIGHT                            = 1
CONST G4_AROUND                           = 2


Then you just need to edit the code a bit further down, where it says "'start Voice Recognition in current group". This is where you define what each group command will do. My programming is not very elegant but I used this for the above command set:

Code: Select all
'implement actions based on VRGROUP and VRCOMMAND
IF VRGROUP = GROUP_0 THEN ' Robo has recognised his name
   VRGROUP = GROUP_1 ' so activate command Group 1
   PRINT &HFE, &H01 ' clear LCD screen
   PRINT &HFE, &H80 ' move cursor top left
   PRINT "YES" ' Robo is ready for his orders
   VRBLINK = 1 ' blink LED to show he is waiting
   VRLED = 1 ' on
   GOTO MAIN
ENDIF

IF VRGROUP = GROUP_1 THEN ' Robo has received his next command

   IF VRCOMMAND = 1 THEN ' Consider MOVE as word 1 of Group 1
   VRGROUP = GROUP_2
   PRINT &HFE, &H01
   PRINT &HFE, &H80
   PRINT "MOVE WHICH WAY?"
       
   ELSEIF VRCOMMAND = 3 THEN ' Consider ROLL as word 3 of Group 1
   VRGROUP = GROUP_3
   PRINT &HFE, &H01
   PRINT &HFE, &H80
   PRINT "ROLL WHICH WAY?"
      
   ELSEIF VRCOMMAND = 4 THEN ' Consider TURN as word 4 of Group 1
   VRGROUP = GROUP_4
   PRINT &HFE, &H01
   PRINT &HFE, &H80
   PRINT "TURN WHICH WAY?"
   
   ELSE
   VRGROUP = GROUP_0 ' back to trigger
   VRBLINK = 0 'still
   VRLED = 1 'off
   ENDIF
   ON VRCOMMAND GOTO sleep,MAIN,hands_up,MAIN,MAIN,clap,battery,bow,K9
ENDIF

IF VRGROUP = GROUP_2 THEN
   VRGROUP = GROUP_0 ' back to trigger
   VRBLINK = 0 'still
   VRLED = 1 'off
   ON VRCOMMAND GOTO left_shift,right_shift,forward_move,backward_move
ENDIF

IF VRGROUP = GROUP_3 THEN
   VRGROUP = GROUP_0 ' back to trigger
   VRBLINK = 0 'still
   VRLED = 1 'off
   ON VRCOMMAND GOTO left_roll,right_roll,forward_roll,back_roll
ENDIF

IF VRGROUP = GROUP_4 THEN
   VRGROUP = GROUP_0 ' back to trigger
   VRBLINK = 0 'still
   VRLED = 1 'off
   ON VRCOMMAND GOTO left_turn,right_turn,turn_around
ENDIF

GOTO MAIN

'============================================


The "ON VRCOMMAND GOTO..." line just passes the program to command 0, 1, 2 ...etc of the group that is currently defined. I've used the subroutine name but you can also use k1, k2, k3 etc. It's probably kindergarten programming for most people but it took me a little while to get my head around it.

You might also want to look at this post on the VRbot forum:

http://www.veear.eu/Forums/tabid/236/forumid/8/threadid/44/scope/posts/Default.aspx

Anyway, let me know if you have problems.
ozfiddler
Savvy Roboteer
Savvy Roboteer
Posts: 93
Joined: Tue Oct 26, 2010 1:01 am

Post by Reckless » Wed Dec 01, 2010 4:11 pm

Post by Reckless
Wed Dec 01, 2010 4:11 pm

Bloody good effort mate LCD is quite slick much better than a beep, i ws planing on using a nod with my little head mod. I'm still waiting for my VRbot to turn up. But ill defiantly be referring to your posts when its time for me to have a play.
I had also been looking or a voice for Mr sushi and had been thinking of this one listed in the wiki.
http://www.quadravox.com/frameset/qvframeset.htm
bit expensive as needs a programming card as well but looked cool. Ill wait till i get the VRbot working and ill see how you get on before I pursue it any further.

I see you mounted the mic in the chest plate. I think Ill copy your installation looks neat.
Bloody good effort mate LCD is quite slick much better than a beep, i ws planing on using a nod with my little head mod. I'm still waiting for my VRbot to turn up. But ill defiantly be referring to your posts when its time for me to have a play.
I had also been looking or a voice for Mr sushi and had been thinking of this one listed in the wiki.
http://www.quadravox.com/frameset/qvframeset.htm
bit expensive as needs a programming card as well but looked cool. Ill wait till i get the VRbot working and ill see how you get on before I pursue it any further.

I see you mounted the mic in the chest plate. I think Ill copy your installation looks neat.
Reckless
Robot Builder
Robot Builder
Posts: 12
Joined: Mon Nov 08, 2010 8:35 pm

Post by Kelpy » Wed Dec 01, 2010 5:51 pm

Post by Kelpy
Wed Dec 01, 2010 5:51 pm

Thank you so much for that, ozfiddler. I'm still very new to all this, but with your help maybe I'll be able to understand it.
It sounds like the VRbot comes with help, so I think I'll have to order one - and an LCD :wink:
Thanks again. :D
Thank you so much for that, ozfiddler. I'm still very new to all this, but with your help maybe I'll be able to understand it.
It sounds like the VRbot comes with help, so I think I'll have to order one - and an LCD :wink:
Thanks again. :D
Kelpy
Savvy Roboteer
Savvy Roboteer
Posts: 45
Joined: Wed Jul 14, 2010 6:42 pm


5 postsPage 1 of 1
5 postsPage 1 of 1