I'm having some problems with a c#.NET speech recognition I'm trying to make for MM.
In the class, I declare:
Code: Select all
private SongsDB.ISDBApplication myMMApp = new SongsDB.SDBApplicationClass();OK. When MM is running, nothing special happens but when it doesn't run it starts up on this line:
Code: Select all
SongsDB.SDBArtists Artists = myMMApp.Player.CurrentSongList.Artists;The full code to add artists to Speech Grammar:
Code: Select all
ruleListItems.Clear();
SongsDB.SDBArtists Artists = myMMApp.Player.CurrentSongList.Artists;
for(int i = 0; i < Artists.Count; i++){
word = Artists.get_Item(i).Name;
Console.WriteLine(">" + i + ">" + word);
this.Items[i] = word;
ruleListItems.InitialState.AddWordTransition(null, word,
" ", SpeechGrammarWordType.SGLexical, word, i, ref propValue, 1F);
}The output is:
>0>DJ Rave
>1>Dream Your Dream
>2>Fischerspooner
>3>Dune
>4>Jean Michel Jarre
>5>Daan
Where it should be
>0>DJ Rave
>1>Dream Your Dream
>2>Fischerspooner
>3>Flip Kowlier
>4>Dune
>5>Jean Michel Jarre
>6>Daan
looking at MM's Now Playing list. Probably MM doesn't like artist Flip Kowlier and pretends that it isn't in the Artists collection. I don't like this kind of artificial intelligence. It's to subjective!
When it then recognises Fischerspooner, it plays that one. When it recognises Dune, it plays Flip Kowlier.
(Flip Kowlier is the only artist I'm having problems with for now)
Another problem is that sometimes MM doesn't stay open or that it goes 100% CPU.
Any help would be appreciated.
Cheers
Steegy
