crhawle
Newbie
Posts: 4
Joined: Tue Sep 13, 2016 9:13 pm

Error recognizing from stream

Tue Sep 13, 2016 9:21 pm

i tried using a memory stream in the recognition engine and errors happened. I documented this problem decently on stackoverflow. here is the link

http://stackoverflow.com/questions/3946 ... ory-stream

other relevant information:
running .net 4.6.1 in windows 10 anniversary update

JeffersonStack
Pro
Posts: 44
Joined: Fri Apr 05, 2013 1:20 am

Re: Error recognizing from stream

Tue Sep 13, 2016 10:21 pm

Prolly _recognizer.StartRecognition is looking for FileStream or something. Could you try saving the wave stream to file and then starting the recognition :? like in the Speech Demo in GitHub.

crhawle
Newbie
Posts: 4
Joined: Tue Sep 13, 2016 9:13 pm

Re: Error recognizing from stream

Wed Sep 14, 2016 7:32 am

i actually realized that the stream isn't the problem. the file I/o is what is failing

Code: Select all

9/13/2016 10:06:19 PM Info TextDictionary Loading filler dictionary from: E:\box\Box Sync\bloop\knwl\NLPtest\bin\x86\Debug\model\en-us/noisedict
9/13/2016 10:06:19 PM Error StreamSpeechRecognizer System.NullReferenceException: Object reference not set to an instance of an object.
   at Syn.Speech.Jsgf.Parser.JSGFParser.NewGrammarFromJSGF(URL url, JSGFRuleGrammarFactory factory)
   at Syn.Speech.Jsgf.JSGFGrammar.LoadNamedGrammar(String grammarName)

crhawle
Newbie
Posts: 4
Joined: Tue Sep 13, 2016 9:13 pm

Re: Error recognizing from stream

Wed Sep 14, 2016 9:14 am

I fixed the above error by moving files to the root drive directory. I also copied the files from github. The following is occuring due to what appears to be a java error.

i keep getting either of the two following errors depending on how i choose to stream the data.

Code: Select all

Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
This one occurs when reading back from the filestream
or

Code: Select all

Exception thrown: 'System.IO.IOException' in Syn.Speech.dll

Additional information: I/O error occurred.
This one occurs when reading from the memory steam as outlined in the github example

JeffersonStack
Pro
Posts: 44
Joined: Fri Apr 05, 2013 1:20 am

Re: Error recognizing from stream

Wed Sep 14, 2016 10:46 am

Code: Select all

Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll
doesn't help :( . There shouldn't be any restriction on where you place your wave audio files though. You could try using Path.Combine method to get the right path to the audio file. I downloaded the project from GitHub a while ago and it seems to be working for me.

crhawle
Newbie
Posts: 4
Joined: Tue Sep 13, 2016 9:13 pm

Re: Error recognizing from stream

Thu Sep 15, 2016 1:01 am

i finally got it to work. i restarted coding it and managed to track down all the errors this time around.

Return to “Report Bugs and Issues”

Who is online

Users browsing this forum: No registered users and 1 guest