Voice recognition
Moderators: winston, another_commander
Voice recognition
Commmander Joe has been working on a voice recognition command system. It uses the windows 7 inbuilt VR and the glovePIE interface.
Here's the glovePIE script...
// Targetting computer
t = said("weapons target missile") or said("weapons arm missile")
u = said("weapons untarget missile") or said("weapons dissarm missile")
m = said("weapons launch missile") or said("weapons fire missile")
y = said("weapons next missile")
key.Multiply = said("weapons Cycle forward between targets")
key.minus = said("weapons Cycle backward between targets")
// weapons
Tab = said("weapons fire energy bomb")
A = said("weapons fire laser")
if said("weapons fire a 3 second burst") then begin
press A
wait 3000 ms
release A
end
if said("weapons let them have it") then begin
press A
wait 5000 ms
release A
say("Hey commander, we got them that time, we really blasted them.")
end
// tactical
Escape = said("launch escape pod")
L = said("tacticle request docking permission")
R = said("tacticle cycle cargo to dump")
z = said("tacticle zoom display") or said ("tacticle magnify display")
key.\ = said("tacticle next compass mode") or said ("tacticle change compass mode")
if said("tacticle Show log") or said ("tacticle display the ships log")) then begin
press Console
wait 9000 ms
release Console
end
if said("tacticle show advanced navigational array") then begin
press LeftShift+6
wait 9000 ms
release LeftShift+6
end
if said("tacticle show polictical information") then begin
press I
wait 9000 ms
release I
end
if said("tacticle show economic information") then begin
press I
wait 9000 ms
release I
end
if said("tacticle save position") then begin
press F2
wait 100 ms
release F2
wait 1000 ms
press enter
wait 100 ms
release enter
end
if said("tacticle evasive manouvers") then begin
press up
wait 3000 ms
release up
wait 100 ms
press left
wait 500 ms
release left
wait 100 ms
say("evasive manouvers in progress")
press down
wait 500 ms
release down
press right
wait 500 ms
release right
end
F1 = said("tacticle forward view") or said ("tacticle front view")
F2 = said("tacticle rear view")
F3 = said("tacticle left view")
F4 = said("tacticle right view")
r = said("tacticle scan forwards" or said ("tacticle whats that") or said ("tacticle activate forward scan")
F5 = said("tacticle display our reputation") or said ("tacticle display special cargo")
F6 = said("tacticle display short range scan") or said ("tacticle short range scan")
F6 = said("tacticle display long range scan") or said ("tacticle long range scan")
F7 = said("tacticle display data on system") or said ("tacticle data on system") or said ("tacticle display system records")
// helm
key.Apostrophe = said("helm left a bit")
key.Dot= said("helm right a bit")
key.up= said("Up") or said("previous item")
key.Down= said("Down") or said("next item")
w = said("helm increase speed") or said("helm more speed")
s = said("helm decrease speed") or said("helm slow down")
if said("helm engage fuel injectors 3 second burn") then begin
press i
wait 3000 ms
release i
end
if said("helm engage fuel injectors 10 second burn") then begin
press i
wait 10000 ms
release i
end
if said("helm engage fuel injectors 15 second burn") then begin
press i
wait 15000 ms
release i
wait 10000 ms
say("Wha hey commander, that was fun!")
end
j = said("helm engage jump drive") or said("helm engage the jump drive") or said("helm fire up the jump drive")
g = said("helm prepare for galactic hyperspace")
h = said("helm start hyperdrive countdown") or said("helm make it so") or said("helm get us out of here")
c = said("helm start docking proceedure") or said("helm start the docking proceedure")
Shift+C = said("helm lets have a drink") or said("helm time to visit the black monks") or said("helm dock with target") or said("helm dock with that ship")
key.Shift + D = said("helm dock quickly")
F1 = said("helm take us out of dock") or said("helm launch the ship")
// Engineering
F3 = said("engineering we need to buy new equipment")
F3 = said("engineering lets check out the ships for sale")
F2 = said("engineering show the ships options")
p = said("engineering freeze time and space")
if said("engineering fill her up") then begin
say("Okay commander I will get the fuel loaded.")
press F3
wait 100 ms
release F3
wait 500 ms
press enter
wait 100 ms
release enter
end
if said("engineering load a missile") then begin
press F3
wait 100 ms
release F3
wait 500 ms
press down
wait 100 ms
release down
wait 500 ms
press enter
wait 100 ms
release enter
wait 6000 ms
say("Okay commander, I will equip the ship with a standard missile.")
end
if said("engineering damage report") then begin
press F5
wait 100 ms
release F5
wait 3000 ms
say("Oooh commander this ship is as good as she will ever be")
wait 7000 ms
press F1
wait 100 ms
release F1
end
if said("engineering transfer fuel from external tank") then begin
say("Okay commander I will pump the fuel, I hope you've selected the fuel pod properly this time.")
wait 6000 ms
press t
wait 100 ms
release t
wait 500 ms
press key.M
wait 100 ms
release key.M
end
// Trader
F8 = said("trader display market prices") or said("trader display the market prices") or said("trader display market prices on main screen")
F8 = said("trader display contracts") or said("trader display contracts available")
enter = said("trader buy that")
enter = said("trader sell that")
if microphone.partialphrase<>'' then debug = microphone.PartialPhrase
if said("what can I say") then
say("Please ask: What can I say to my helmsman?. What can I say to my trader?. What can I say to my weapons officer?");
end if
if said("What can I say to my weapons officer?") then
say("You can say "
... + "weapons target missile "
... + "weapons untarget missile "
... + "weapons launch missile "
... + "weapons next missile "
... + "weapons fire energy bomb "
... + "weapons fire laser "
... + "weapons fire a 3 second burst ")
end if
if said("What can I say to my tacticle officer?") then
say("You can say: "
... + "launch escape pod "
... + "tacticle request docking permission "
... + "tacticle show advanced navigational array "
... + "tacticle show polictical information "
... + "tacticle show economic information "
... + "tacticle save position "
... + "tacticle evasive manouvers "
... + "tacticle forward view "
... + "tacticle rear view "
... + "tacticle left view "
... + "tacticle right view "
... + "tacticle display short range scan "
... + "tacticle display short range scan "
... + "tacticle display data on system")
end if
if said("What can I say to my trader?") then
say("You can say: "
... + "trader display market prices "
... + "trader buy that "
... + "trader food, textiles, alloys, computers ")
end if
if said("What can I say to my engineer?") then
say("You can say: "
... + "engineering we need to buy new equipment "
... + "engineering lets check out the ships for sale "
... + "engineering show the ships options "
... + "engineering fill her up "
... + "engineering load a missile "
... + "engineering transfer fuel from external tank")
end if
if said("What can I say to my helmsman?") then
say("You can say: "
... + "helm increase speed "
... + "helm decrease speed "
... + "helm engage fuel injectors "
... + "helm engage jump drive "
... + "helm prepare for galactic hyperspace "
... + "helm start hyperdrive countdown "
... + "helm dock quickly "
... + "helm start docking proceedure "
... + "helm take us out of dock ")
end if
Here's the glovePIE script...
// Targetting computer
t = said("weapons target missile") or said("weapons arm missile")
u = said("weapons untarget missile") or said("weapons dissarm missile")
m = said("weapons launch missile") or said("weapons fire missile")
y = said("weapons next missile")
key.Multiply = said("weapons Cycle forward between targets")
key.minus = said("weapons Cycle backward between targets")
// weapons
Tab = said("weapons fire energy bomb")
A = said("weapons fire laser")
if said("weapons fire a 3 second burst") then begin
press A
wait 3000 ms
release A
end
if said("weapons let them have it") then begin
press A
wait 5000 ms
release A
say("Hey commander, we got them that time, we really blasted them.")
end
// tactical
Escape = said("launch escape pod")
L = said("tacticle request docking permission")
R = said("tacticle cycle cargo to dump")
z = said("tacticle zoom display") or said ("tacticle magnify display")
key.\ = said("tacticle next compass mode") or said ("tacticle change compass mode")
if said("tacticle Show log") or said ("tacticle display the ships log")) then begin
press Console
wait 9000 ms
release Console
end
if said("tacticle show advanced navigational array") then begin
press LeftShift+6
wait 9000 ms
release LeftShift+6
end
if said("tacticle show polictical information") then begin
press I
wait 9000 ms
release I
end
if said("tacticle show economic information") then begin
press I
wait 9000 ms
release I
end
if said("tacticle save position") then begin
press F2
wait 100 ms
release F2
wait 1000 ms
press enter
wait 100 ms
release enter
end
if said("tacticle evasive manouvers") then begin
press up
wait 3000 ms
release up
wait 100 ms
press left
wait 500 ms
release left
wait 100 ms
say("evasive manouvers in progress")
press down
wait 500 ms
release down
press right
wait 500 ms
release right
end
F1 = said("tacticle forward view") or said ("tacticle front view")
F2 = said("tacticle rear view")
F3 = said("tacticle left view")
F4 = said("tacticle right view")
r = said("tacticle scan forwards" or said ("tacticle whats that") or said ("tacticle activate forward scan")
F5 = said("tacticle display our reputation") or said ("tacticle display special cargo")
F6 = said("tacticle display short range scan") or said ("tacticle short range scan")
F6 = said("tacticle display long range scan") or said ("tacticle long range scan")
F7 = said("tacticle display data on system") or said ("tacticle data on system") or said ("tacticle display system records")
// helm
key.Apostrophe = said("helm left a bit")
key.Dot= said("helm right a bit")
key.up= said("Up") or said("previous item")
key.Down= said("Down") or said("next item")
w = said("helm increase speed") or said("helm more speed")
s = said("helm decrease speed") or said("helm slow down")
if said("helm engage fuel injectors 3 second burn") then begin
press i
wait 3000 ms
release i
end
if said("helm engage fuel injectors 10 second burn") then begin
press i
wait 10000 ms
release i
end
if said("helm engage fuel injectors 15 second burn") then begin
press i
wait 15000 ms
release i
wait 10000 ms
say("Wha hey commander, that was fun!")
end
j = said("helm engage jump drive") or said("helm engage the jump drive") or said("helm fire up the jump drive")
g = said("helm prepare for galactic hyperspace")
h = said("helm start hyperdrive countdown") or said("helm make it so") or said("helm get us out of here")
c = said("helm start docking proceedure") or said("helm start the docking proceedure")
Shift+C = said("helm lets have a drink") or said("helm time to visit the black monks") or said("helm dock with target") or said("helm dock with that ship")
key.Shift + D = said("helm dock quickly")
F1 = said("helm take us out of dock") or said("helm launch the ship")
// Engineering
F3 = said("engineering we need to buy new equipment")
F3 = said("engineering lets check out the ships for sale")
F2 = said("engineering show the ships options")
p = said("engineering freeze time and space")
if said("engineering fill her up") then begin
say("Okay commander I will get the fuel loaded.")
press F3
wait 100 ms
release F3
wait 500 ms
press enter
wait 100 ms
release enter
end
if said("engineering load a missile") then begin
press F3
wait 100 ms
release F3
wait 500 ms
press down
wait 100 ms
release down
wait 500 ms
press enter
wait 100 ms
release enter
wait 6000 ms
say("Okay commander, I will equip the ship with a standard missile.")
end
if said("engineering damage report") then begin
press F5
wait 100 ms
release F5
wait 3000 ms
say("Oooh commander this ship is as good as she will ever be")
wait 7000 ms
press F1
wait 100 ms
release F1
end
if said("engineering transfer fuel from external tank") then begin
say("Okay commander I will pump the fuel, I hope you've selected the fuel pod properly this time.")
wait 6000 ms
press t
wait 100 ms
release t
wait 500 ms
press key.M
wait 100 ms
release key.M
end
// Trader
F8 = said("trader display market prices") or said("trader display the market prices") or said("trader display market prices on main screen")
F8 = said("trader display contracts") or said("trader display contracts available")
enter = said("trader buy that")
enter = said("trader sell that")
if microphone.partialphrase<>'' then debug = microphone.PartialPhrase
if said("what can I say") then
say("Please ask: What can I say to my helmsman?. What can I say to my trader?. What can I say to my weapons officer?");
end if
if said("What can I say to my weapons officer?") then
say("You can say "
... + "weapons target missile "
... + "weapons untarget missile "
... + "weapons launch missile "
... + "weapons next missile "
... + "weapons fire energy bomb "
... + "weapons fire laser "
... + "weapons fire a 3 second burst ")
end if
if said("What can I say to my tacticle officer?") then
say("You can say: "
... + "launch escape pod "
... + "tacticle request docking permission "
... + "tacticle show advanced navigational array "
... + "tacticle show polictical information "
... + "tacticle show economic information "
... + "tacticle save position "
... + "tacticle evasive manouvers "
... + "tacticle forward view "
... + "tacticle rear view "
... + "tacticle left view "
... + "tacticle right view "
... + "tacticle display short range scan "
... + "tacticle display short range scan "
... + "tacticle display data on system")
end if
if said("What can I say to my trader?") then
say("You can say: "
... + "trader display market prices "
... + "trader buy that "
... + "trader food, textiles, alloys, computers ")
end if
if said("What can I say to my engineer?") then
say("You can say: "
... + "engineering we need to buy new equipment "
... + "engineering lets check out the ships for sale "
... + "engineering show the ships options "
... + "engineering fill her up "
... + "engineering load a missile "
... + "engineering transfer fuel from external tank")
end if
if said("What can I say to my helmsman?") then
say("You can say: "
... + "helm increase speed "
... + "helm decrease speed "
... + "helm engage fuel injectors "
... + "helm engage jump drive "
... + "helm prepare for galactic hyperspace "
... + "helm start hyperdrive countdown "
... + "helm dock quickly "
... + "helm start docking proceedure "
... + "helm take us out of dock ")
end if
Last edited by -Joe on Sat Oct 23, 2010 1:33 am, edited 2 times in total.
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Sounds like an interesting idea - but nobody from Israel will be able to use it...
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Re: Usage
-Joe wrote:Yeah, that's a glovePIE licence issue. GlovePIE is a nice piece of code however and easy to program.
I think I should maybe develop the Sheepdog flight control system v1 for those pilots with a damaged joystick!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
It works
I went to Maplin Elcteronics and bought myself a micro sized bluetooth earpiece for £6.95 and got that working with my PC as a sound device.
Fired up glovePIE and ran my script as is...... and it works really nicely. Now I havn't even lookled at calibrating the windows 7 VR yet but I'm flying and able to sound out commands it well... it just works.
"Trader market prices" and as if by magic the market screen appears. The VR is quick and responsive, good enough for combat.
In combat "weapons fire laser" well it fires just one pulse, I'm going to modify my script now to also have "weapons fire 3 second laser burst"
Now that I know it works I am going to refine my script to include more options and choices.
I'm going to add the cargo names so I can say.
"helm dock quickly"
"engineering fill her up"
"trade computers"
"trade buy that"
"helm launch"
"helm 3 second injector burn"
"helm activate hyperdrive"
etc
Sheepdog V1 will have to wait till I've got the crew in shape!
commander Joe (Average) (---- ELITE ---- on 5.25")
Fired up glovePIE and ran my script as is...... and it works really nicely. Now I havn't even lookled at calibrating the windows 7 VR yet but I'm flying and able to sound out commands it well... it just works.
"Trader market prices" and as if by magic the market screen appears. The VR is quick and responsive, good enough for combat.
In combat "weapons fire laser" well it fires just one pulse, I'm going to modify my script now to also have "weapons fire 3 second laser burst"
Now that I know it works I am going to refine my script to include more options and choices.
I'm going to add the cargo names so I can say.
"helm dock quickly"
"engineering fill her up"
"trade computers"
"trade buy that"
"helm launch"
"helm 3 second injector burn"
"helm activate hyperdrive"
etc
Sheepdog V1 will have to wait till I've got the crew in shape!
commander Joe (Average) (---- ELITE ---- on 5.25")
key press delays
Just found out each key press in a macro needs a 100ms delay to work. Save position now works, working on the rest!
- Cmd. Cheyd
- ---- E L I T E ----
- Posts: 934
- Joined: Tue Dec 16, 2008 2:52 pm
- Location: Deep Horizon Industries Manufacturing & Research Site somewhere in G8...
Seems like a cool idea.
But I refuse to install glovePIE. I do not want the author to mistake interest in his software for support of his socio-political idiocy.
But I refuse to install glovePIE. I do not want the author to mistake interest in his software for support of his socio-political idiocy.
Find my OXP's at:
Deep Horizon Industries - Your Planet Our Design
Deep Horizon Industries - Your Planet Our Design
new script for glovePIE
Added spoken feedback, and list the commands with "what can i say?"
Last edited by -Joe on Fri Oct 22, 2010 10:44 pm, edited 1 time in total.
I think this is an awesome idea. I'm sure it will be quite neat.
However I can't help but think of a comedy piece about accents that I just saw, so I am posting it here, as it's relevance will be clear upon watching it.
http://www.youtube.com/watch?v=5FFRoYhTJQQ
However I can't help but think of a comedy piece about accents that I just saw, so I am posting it here, as it's relevance will be clear upon watching it.
http://www.youtube.com/watch?v=5FFRoYhTJQQ
Using VR whilst playing Oolite
Just been out for a quick prowl around the Eninry anarchy system with VR active. I like get on the six of my oponents and say "weapons fire 3 second burst" then try to hold my mills on the target. 3 seconds of mill lazer action usually does the trick, hah ha. (fixed the bug in autofire in v2.1)
The missile management is useful too, it works really nicely in real combat situations.
"Tacticile display short range scan" & "Trader display markey prices" are nice for browsing when in the mood with "tactcile forward view" returning from these screens.
My pal has a jedi mind trainer I heard somewhere that they are bluetooth, I wonder if I can fire an energy bomb with the power of thourght alone.
The missile management is useful too, it works really nicely in real combat situations.
"Tacticile display short range scan" & "Trader display markey prices" are nice for browsing when in the mood with "tactcile forward view" returning from these screens.
My pal has a jedi mind trainer I heard somewhere that they are bluetooth, I wonder if I can fire an energy bomb with the power of thourght alone.
You can get a download from chip.eu
About glovePIE not working in Israel, I do wonder how he managed to do that! Probably it detects the israeli locale. If that's the case, it's a slightly magnified claim, and not necessarily accurate.
About glovePIE not working in Israel, I do wonder how he managed to do that! Probably it detects the israeli locale. If that's the case, it's a slightly magnified claim, and not necessarily accurate.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin