Problem with my SpeechRecognition plugin

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Problem with my SpeechRecognition plugin

Re: Problem with my SpeechRecognition plugin

by nohitter151 » Thu Aug 13, 2009 9:16 pm

jitterjames wrote:I've just finished putting together a series of videos (one of which I posted earlier today - but I can't edit the post)
You can only edit posts as a registered user (free to register) who is logged in via the forum.

Re: Problem with my SpeechRecognition plugin

by jitterjames » Thu Aug 13, 2009 9:09 pm

I've just finished putting together a series of videos (one of which I posted earlier today - but I can't edit the post)

I'm calling the program VoxCommando and it sends commands to eventghost through the LAN. It's controlling MediaMonkey but also doing other stuff.

part 1 - on the deck
http://www.youtube.com/watch?v=B4dk4uVNnho

part 2 - inside with TV
http://www.youtube.com/watch?v=gQGwmXQLQ4Y

part 3 - system and electricity
http://www.youtube.com/watch?v=MqL-D3-_83U

part 4 - flexibility
http://www.youtube.com/watch?v=tjopvkuocng

Re: Problem with my SpeechRecognition plugin

by nohitter151 » Thu Aug 13, 2009 5:07 pm

jitterjames wrote:I have voice recognition working quite nicely with mediamonkey but using other software as well.

I am doing the voice recognition with a c# program I wrote and sending commands to EventGhost. EventGhost is then communicating with MediaMonkey.

http://www.youtube.com/watch?v=B4dk4uVNnho
Cool!

Re: Problem with my SpeechRecognition plugin

by jitterjames » Thu Aug 13, 2009 11:32 am

I have voice recognition working quite nicely with mediamonkey but using other software as well.

I am doing the voice recognition with a c# program I wrote and sending commands to EventGhost. EventGhost is then communicating with MediaMonkey.

http://www.youtube.com/watch?v=B4dk4uVNnho

by Morten » Fri Apr 13, 2007 11:46 am

DiddeLeeDoo wrote:This is more like the way I have experienced voice recognition.
http://www.youtube.com/watch?v=2Y_Jp6PxsSQ

:)
And the whole video;

http://www.youtube.com/watch?v=kX8oYoYy ... ed&search=

by DiddeLeeDoo » Fri Apr 13, 2007 11:39 am

This is more like the way I have experienced voice recognition.
http://www.youtube.com/watch?v=2Y_Jp6PxsSQ

:)

by Morten » Fri Apr 13, 2007 11:06 am

I guess you've seen the wrong videos then;

http://youtube.com/watch?v=zgJyqvcAXe0

by Steegy » Fri Apr 13, 2007 10:51 am

Well, Windows XP and below also support speech recognition, but you have to download some extra files (SAPI) from the internet first. I guess Windows Vista already has these files in the standard installation. Maybe Vista introduces a newer version of SAPI, because the last version I tried (version 5) was good in general, but not good enough to use with things like MediaMonkey, where a lot of artist names and such resemble each other too much (and they're sometimes in a non-English language).

Addition: from what I found on the internet, Speech Recognition in Vista (unfortunately) doesn't seem better than SAPI5.

by Morten » Fri Apr 13, 2007 10:39 am

Ok, so Windows Vista has support for Speech Recognition. I haven't tried it with MediaMonkey yet, but does anyone now if MediaMonkey support this technology?

by DiddeLeeDoo » Wed Apr 19, 2006 12:28 pm

Since it is SAPI related, I just wanted to share how your code-magic have been implemented as a non-default option in my first 'baby, AutoRateSongs.

I went ahead to get a better voice for SAPI5 and it's not that bad really. I enjoy this use of SAPI5 in MediaMonkey.

http://www.mediamonkey.com/forum/viewto ... &start=113

I just wish I could do something useful for you Steegy.

by DiddeLeeDoo » Wed Apr 19, 2006 7:18 am

This is so much fun!! :D Here I have been sitting for many many hours, reading, searching, trying, then, what if....and so on.. :o ..

I think I'm hooked to scripting. What a fine hobby..

You're right though, that Microsoft Sam does not really go that well with music. Maybe with an other voice... :wink:

by Steegy » Wed Apr 19, 2006 6:32 am

Hello

What you are suggesting can easily be done, however you need to have a TextToSpeech engine installed. SAPI5 is installed by default on WindowsXP systems, so let's use this one (it's the best free one).

Please do mind that a computer voice like SAPI can be very irritating, certainly if it is used with nice music.

Usage:
ttsSpeak YourTextToSpeek, VoiceNumber, Asynchronous
- VoiceNumber is the installed voice on your computer (most have only one). Use 0 if you want to use the default voice.
- Asynchronous should be set to False, unless you are calling the method from another method that takes long to complete.

Code: Select all

ttsSpeak "Hello, this is just a little test.", 0, False

Sub ttsSpeak(Text, VoiceNumber, Asynchronous)
    Dim tts, speechFlag
    
    On Error Resume Next
    
    Set tts = Nothing
    Set tts = CreateObject("Sapi.SpVoice")

    If Not tts Is Nothing Then
        If (VoiceNumber - 1) < tts.GetVoices.Count Then
            Err.Clear
            If VoiceNumber <> 0 Then Set tts.Voice = tts.GetVoices.Item(VoiceNumber - 1)
            If Err.Number = 0 Then
                If Asynchronous Then
                    speechFlag = 1
                Else
                    speechFlag = 0
                End If
                tts.Speak Text, speechFlag
            End If
        End If
    End If
    
End Sub
BTW: Because TextToSpeech and Speech recognition are about the same subject (like SAPI), this certainly isn't of topic.

Similar functions for SAPI4 also exist, but this is an old thing. Consider using SAPI5 instead (well, WindowsXP users will be very easy as it is already installed by default)

BTW2: This sample of code is very similar to what is programmed in major programming languages (c++, java, c#, vb, ...).

Cheers
Steegy

by DiddeLeeDoo » Wed Apr 19, 2006 4:40 am

Speech is interesting stuff, and I could not find much about it here in this forum.

Just for the fun of it I would love to just have MM say what's playing now.

Speak (Iter.Song & " by " & Iter.Artist )
sort of thing.

I found a snip that suppose to act as a function.

Code: Select all

// Speak the given phrase, returns when speaking finishes
function wshSpeak(phrase) {
   var vt = WScript.CreateObject("Speech.VoiceText");
   vt.Register("", WScript.ScriptName);
   vt.Speak(phrase, 1);
   while ( vt.IsSpeaking ) WScript.Sleep(100);
}
and combined with Java Script it suppose to work.

Save the above as wshTTS.js and use it like

Code: Select all

<job>
  <script language="JScript" src="wshTTS.js" />

  <script language="VBScript">
    wshSpeak "This is Sapi talking from a WSF file"
  </script>
</job>
Ref: http://www.generation5.org/content/2001/tts_wsh.asp

I try various things, but so far I've been unsuccessful, still reading..

Sorry if this is totally off topic in this thread. Since in study mode, I do not feel like starting a new topic just for this little thing.

by psyXonova » Mon Apr 10, 2006 4:22 am

Assuming that the speech recognition engine is the same used in windows and MS office then those are 2 very important issues you should consider and perhaps can explain the low recognition percentage (offcourse those sould apply to all recognition engines but i am familiar only with the MS one)
  1. Buy a decent microphone. It doesnt have to be an expensive one, but in any case you should use the microphone with headphones, since problems occur when the microphone captures the sound of you speakers..
    This offcourse in a major problem on all speech aware applications but it is certainly worst when it comes to music. Imagine trying to say "Fisherspooner" the same time a track plays loud from you speaker.
  2. Train the engine. Without proper training results will be poor no matter what. The Engine included in MS office provides a training tool, use it to see how it works. The more you train your engine to your accent the more stable will be.
Also using the artificial voice of TextToSpeech as a voice command is not a good idea. SR engines use natural voice patterns and are not designed to accept commands from an artificial voice (machines can communicate each other with much faster and reliable ways :lol: :lol: :lol: ). I suggest trying using your own voice.

In any case i am also very interested in this idea... keep us update please

by Steegy » Sat Apr 08, 2006 4:16 pm

In theory, yes.
And maybe some powerful and very expensive speech recognition software can do that already (when you speak the text, not sing it...). But certainly not the free Microsoft Speech Recognition...

Cheers
Steegy

Top