acnep
Posts: 4
Joined: Tue May 16, 2017 6:04 pm

Syn.Speech - Error occurs when modify JSGF Gram file.

Wed May 17, 2017 11:46 am

Hi, everybody.
I'm working on the sys.speech demo described on the site. It works good with its own wav and gram files. But when I change grammar file (../Syn.Speech.Demo/bin/Debug/Models/hello.gram) with mine, it occurs error. How i can fix it?

Thanks in advance.


ERROR :


5/16/2017 6:11:57 PM Info AutoCepstrum Cepstrum component auto-configured as follows: autoCepstrum {MelFrequencyFilterBank, Denoise, DiscreteCosineTransform2, Lifter}
5/16/2017 6:11:57 PM Info Sphinx3Loader Loading tied-state acoustic model from: /root/speechRecwithMono/TEST3/Syn.Speech.Demo/Syn.Speech.Demo/bin/Debug/Models
5/16/2017 6:11:57 PM Info Pool`1 Pool /root/speechRecwithMono/TEST3/Syn.Speech.Demo/Syn.Speech.Demo/bin/Debug/Models/means Entries: 16128
5/16/2017 6:11:57 PM Info Pool`1 Pool /root/speechRecwithMono/TEST3/Syn.Speech.Demo/Syn.Speech.Demo/bin/Debug/Models/variances Entries: 16128
5/16/2017 6:11:57 PM Info Pool`1 Pool /root/speechRecwithMono/TEST3/Syn.Speech.Demo/Syn.Speech.Demo/bin/Debug/Models/transition_matrices Entries: 42
5/16/2017 6:11:57 PM Info Pool`1 Pool senones Entries: 5126
5/16/2017 6:11:57 PM Info GaussianWeights Gaussian weights: /root/speechRecwithMono/TEST3/Syn.Speech.Demo/Syn.Speech.Demo/bin/Debug/Models/mixture_weights. Entries: 15378
5/16/2017 6:11:57 PM Info Pool`1 Pool senones Entries: 5126
5/16/2017 6:11:57 PM Info Sphinx3Loader Context Independent Unit Entries: 42
5/16/2017 6:11:57 PM Info HMMManager HMM Manager: 137095 hmms
5/16/2017 6:11:57 PM Info TiedStateAcousticModel CompositeSenoneSequences: 0
5/16/2017 6:11:57 PM Info TextDictionary Loading dictionary from: /root/speechRecwithMono/TEST3/Syn.Speech.Demo/Syn.Speech.Demo/bin/Debug/Models/cmudict-en-us.dict
5/16/2017 6:11:58 PM Info TextDictionary Loading filler dictionary from: /root/speechRecwithMono/TEST3/Syn.Speech.Demo/Syn.Speech.Demo/bin/Debug/Models/noisedict
5/16/2017 6:11:58 PM Error StreamSpeechRecognizer System.NullReferenceException: Object reference not set to an instance of an object
at Syn.Speech.Helper.URL.OpenStream () [0x00006] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Jsgf.Parser.JSGFParser.NewGrammarFromJSGF (Syn.Speech.Helper.URL url, Syn.Speech.Jsgf.JSGFRuleGrammarFactory factory) [0x00000] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Jsgf.JSGFGrammar.LoadNamedGrammar (System.String grammarName) [0x00019] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Jsgf.JSGFGrammar.CommitChanges () [0x0001f] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Jsgf.JSGFGrammar.CreateGrammar () [0x00000] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Linguist.Language.Grammar.Grammar.Allocate () [0x00023] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Linguist.Flat.FlatLinguist.Allocate () [0x00006] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Decoders.Search.SimpleBreadthFirstSearchManager.Allocate () [0x00060] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Decoders.AbstractDecoder.Allocate () [0x00000] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Recognizers.Recognizer.Allocate () [0x0000e] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Api.StreamSpeechRecognizer.StartRecognition (System.IO.Stream stream, Syn.Speech.Util.TimeFrame timeFrame) [0x00000] in <03b58c391484469f9e142615feff098b>:0
5/16/2017 6:11:58 PM Error StreamSpeechRecognizer Syn.Speech.Helper.IllegalStateException: Expected state Ready actual state Allocating
at Syn.Speech.Recognizers.Recognizer.CheckState (Syn.Speech.Recognizers.Recognizer+State desiredState) [0x00042] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Recognizers.Recognizer.Recognize (System.String referenceText) [0x00000] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Recognizers.Recognizer.Recognize () [0x00000] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Api.AbstractSpeechRecognizer.GetResult () [0x00000] in <03b58c391484469f9e142615feff098b>:0
5/16/2017 6:11:58 PM Error StreamSpeechRecognizer Syn.Speech.Helper.IllegalStateException: Expected state Ready actual state Allocating
at Syn.Speech.Recognizers.Recognizer.CheckState (Syn.Speech.Recognizers.Recognizer+State desiredState) [0x00042] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Recognizers.Recognizer.Deallocate () [0x00000] in <03b58c391484469f9e142615feff098b>:0
at Syn.Speech.Api.StreamSpeechRecognizer.StopRecognition () [0x00000] in <03b58c391484469f9e142615feff098b>:0
Last edited by acnep on Sun May 21, 2017 11:04 pm, edited 2 times in total.

User avatar
Fantom
Help & Support
Posts: 320
Joined: Fri Oct 25, 2013 9:20 pm

Re: Syn.Speech - Error occurs when change wav and gram files

Thu May 18, 2017 4:06 am

I would like to know if you are using the latest Language Models or not. The latest ones may not be compatible with Syn Speech. The ones in the GitHub repository should work just fine.

Also could you make sure the hello.gram file is in the right format. If possible could you share the gram file code and also the url where you downloaded the language models from.

acnep
Posts: 4
Joined: Tue May 16, 2017 6:04 pm

Re: Syn.Speech - Error occurs when change wav and gram files

Fri May 19, 2017 11:10 am

Thanks for your respond.

I'm working on Linux.
I'm running Syn Speech in Mono.
The link I have downloaded dictionary and language model from: https://github.com/SynHub/syn-speech-demo
My machine is running in English-US culture.

It works pretty well without Grammar.
With Grammar it works well at first. But when I modify hello.gram file (../bin/Debug/Models/hello.gram), it do not work after modification, even after biring it to its first instance.

My Grammar file:

Code: Select all

#JSGF V1.0;
grammar hello;
public <command> = ( zero| one | two | three | four | five );

User avatar
Fantom
Help & Support
Posts: 320
Joined: Fri Oct 25, 2013 9:20 pm

Re: Syn.Speech - Error occurs when change wav and gram files

Sat May 20, 2017 4:33 am

I tried to reproduce it on my end in my windows 10 machine and it worked fine. :? I haven't yet installed a VM with any Linux distro so I couldn't test in Linux. Could you share the Audio file that you are trying to transcribe I could by then install a Linux distro and try to reproduce the bug. Also in my test the language models are located within the Release folder and not the Debug folder. One more thingy, Linux paths are case-sensitive.

acnep
Posts: 4
Joined: Tue May 16, 2017 6:04 pm

Re: Syn.Speech - Error occurs when change wav and gram files

Sat May 20, 2017 5:36 pm

Actually there is no problem with audio file. Audio file is in the wav format (Signed 16 bit Little Endian, Rate 16000 Hz, Mono), whic is appropriate. There is no problem also with model. Everytime, at the very beginnig it works well. But when I modify grammar file, after it do not work. It requires to reinstall model. Sometimes it is not even working after reinstallation model or after reinstallation whole test demo. Maybe problem is related with Linux or there is some vulnerability in the system, but that does not mean package or distrubuted model is faultless. Cut a long story short, I can not find what causes this problem, and can not make program substantial. It does not work properly.


In most cases it gives "Expected state READY actual state ALLOCATING" error.

User avatar
Fantom
Help & Support
Posts: 320
Joined: Fri Oct 25, 2013 9:20 pm

Re: Syn.Speech - Error occurs when modify JSGF Gram file.

Mon May 22, 2017 3:01 pm

Which linux distro are you testing it on? I am currently installing LinuxMint just to test this case :(

acnep
Posts: 4
Joined: Tue May 16, 2017 6:04 pm

Re: Syn.Speech - Error occurs when modify JSGF Gram file.

Tue May 23, 2017 2:49 pm

I am running Kali Linux. I actually got it works. But again it occur error when I try to modify gram file, but it is not necessary now. Maybe there is some problem in my linux distro.

Thanks for your effort and time, FranzZ.

Regards.

Return to “Report Bugs and Issues”

Who is online

Users browsing this forum: No registered users and 1 guest