Is it possible to do some speech recognition with FreePIE just like with GlovePIE?
Maybe something like this?
Code: Select all
if said("Free PIE can now use speech"):
speech.say("Free PIE can now use speech");
Code: Select all
if said("Free PIE can now use speech"):
speech.say("Free PIE can now use speech");
Code: Select all
if said("Hello"):
speech.say("Yes you said hello");
I honestly don't know what code to use. Will you be kind enough to post a working sample code? Thank you very much.1: name 'said' is not defined
Code: Select all
if speech.said("Hello"):
speech.say("Yes, you said hello!");
Code: Select all
if speech.said("Option one"):
speech.say("Selected one")
if speech.said("Option two"):
speech.say("Selected two")
Code: Select all
if speech.said("Option One", 0.95):
Nice! Thank you for your continuous updates, CyberVillain.CyberVillain wrote:I added confidence level, it defaults to 0.9 you can override it like
Code: Select all
if speech.said("Option One", 0.95):
Code: Select all
if speech.said("One", 0.95):
speech.say("You said One!");
if speech.said("Two", 0.95):
speech.say("You said two!");
Thanks for that info.CyberVillain wrote:1.0 means that it will only trigger if MS Speech is 100% sure its correct, it will never hit this high. With me not being a native english speaker it hits betwen 0.9 and 0.94 if i say the correct sentence
Both really. I meant something that I'd developed, but adding it to something pre-existing would be awesome as well- though I suppose much harder.CyberVillain wrote:are you talking about integrating MS Speech in you own Unity project or a compiled third party Project?
I have installed Voice Attack today after I test FreePIE with speech recognition, it use the same API for Voice Commands and this Program say that training improve the accuracy on Voice Attack too. And after I train my voice with the Windows Tool I imagine that the accuracy in FreePIE is much better, I can use higher Numbers on speech.said() , before the training I get no response.timmer wrote:Will training the computer improve accuracy in speech recognition?
I looked into this and came up with a bunch of nothing. Unity is C#, but more importantly it is based on Mono, not .NET. Since there is no System.Speech in Mono, the best thing you can do is write a small interpreter in .NET (or FreePie, for that matter) and pass via UDP from the interpreter back and forth to your Unity engine. But then you have to worry about that interpreter running, and it's Windows only.CyberVillain wrote:Unity is C# right? You can take a look at the source code here
https://github.com/AndersMalmgren/FreeP ... hPlugin.cs
Please try with attached file, it shuld now use users culture if it canNoxWings wrote:Wow! Awesome feature! I personally love it for space sim games, It's so cool to be able to "talk to the ship".
Btw This is working perfect with english, but I just can't make it work with other languages (I've tried it in my laptop wich is set to spanish by default). Is it supposed to work or is it just an english feature? AFAIK Since it is using ms speech I thought it should work.
Wow, thank you very much, I'll check it in a few hours and let you know if it is working (I don't have the pc with non-english language just right now and I also need some sleep xD).CyberVillain wrote:Please try with attached file, it shuld now use users culture if it canNoxWings wrote:Wow! Awesome feature! I personally love it for space sim games, It's so cool to be able to "talk to the ship".
Btw This is working perfect with english, but I just can't make it work with other languages (I've tried it in my laptop wich is set to spanish by default). Is it supposed to work or is it just an english feature? AFAIK Since it is using ms speech I thought it should work.
FreePIE automatically uses the default language, but I never noticed it because The confidence level I was hitting was too lowCyberVillain wrote: No Worries, how do you change between languages btw?
Code: Select all
import time
if starting:
speech.say("One!")
time.sleep(1);
speech.say("Two!")
Code: Select all
import time
speech.say("Main")
if starting:
speech.say("One!")
time.sleep(1);
speech.say("Two!")
Code: Select all
import time
if starting:
while(True):
if speech.said("test", 0.5):
keyboard.setKeyDown(Key.A)
time.sleep(0.2)
keyboard.setKeyUp(Key.A)
speech.say("Looped")
time.sleep(2)
Code: Select all
if starting:
if speech.said("test", 0.5):
speech.say("test")
Code: Select all
if speech.said("test"):
speech.say("test")
Code: Select all
speech.say("test")
Code: Select all
if starting:
speech.say("test")
Code: Select all
speech.say("test")
if starting:
speech.say("test2")
Code: Select all
if starting:
speech.say("Hello")
Code: Select all
if keyboard.getPressed(Key.A):
speech.say("Hello")