cmusphinx / sphinx4

Pure Java speech recognition library
cmusphinx.sourceforge.net
Other
1.4k stars 587 forks source link

Sphinx unable to handle multiple files at the same time #36

Closed themoonraker13 closed 9 years ago

themoonraker13 commented 9 years ago

I'm using sphinx4 in my project for speaker identification purpose. The sphinx implementation is able to handle single file without any issues. But, when I run two threads with different files into speaker identification(speaker cluster generation code) the implementation runs into a concurrency issue.

mbait commented 9 years ago

Can you please share the exception log? On 6 Aug 2015 13:25, "Parth Kachchhi" notifications@github.com wrote:

I'm using sphinx4 in my project for speaker identification purpose. The sphinx implementation is able to handle single file without any issues. But, when I run two threads with different files into speaker identification(speaker cluster generation code) the implementation runs into a concurrency issue.

— Reply to this email directly or view it on GitHub https://github.com/cmusphinx/sphinx4/issues/36.

themoonraker13 commented 9 years ago

Well I'm using multiple levels of parallelism in my application and once I confronted the above mentioned issue I was continuously trying alternative ways of exploiting sphinx without running into any errors. So I've lost track of what alternative of code led me to the above error but the error was something like: frontend; couldn't call start() before stop() and the cause of the error was pointing somewhere in SpekerIdentification code of Sphinx. I tried using parallelstream() from jdk 8 and the problem is solved now.

Anyways thanks a ton for listening to my query on such a short notice. Good luck.

mbait commented 9 years ago

It seems that you used one decoder instance in multiple streams. You can't do that.

themoonraker13 commented 9 years ago

I was trying to invoke the cluster method on single instance of SpeakerIdentification class using multiple threads and may be it was causing the problem. Now I'm supplying a fresh copy of SpeakerIdentification to every newly created thread.