-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building against latest Kaldi #11
Comments
Are you able to get results out of ASR-Server ? I can only ever get 'yes' or 'no' |
Yes, this is doing ASR now and I'm getting back full sentences. I had to make one more change listed than above. In online-nnet3-decodable-simple.cc, instead of commenting out computer.Forward() I replaced the line with computer.Run(). From the documentation it looks like Run() does a forward then backward computation, not just forward, but this does work for me. I was able to get it to decode a test wave and got the same results as using the model offline, directly in Kaldi (note that I ripped up the fcgi stuff and just opened an ifstream directly for testing. This is still "online" decoding, only I'm simulating a mic input by directly piping in a test.wav") |
Awesome news! Do you have a branch you are working off ? I'd love to get my copy working |
Attached is the severely hacked test code. If you want to use the fcgi input methods as intended, you can just uncomment them where I've commented them out. This code is simply to try to get the online ASR portion working. |
@bjascob thank you so much for this, I'm reading over it now. After I get it working, I'll try and create a new fork so we can keep it working with the latest Kaldi |
This isn't really the "right" fix since it pulls in some older Kaldi files in order to make it work. The right way is to change the code to use LatticeFasterDecoderConfig and DecodableNnetSimpleLoopedInfo when instantiating SingleUtteranceNnet3Decoder. |
bjascob fork the project, fix it and make pull-request. Our team can not maintain this project right now, so help is appreciated. |
Done. I found some example code of how to use the new API in Kaldi for SingleUtteranceNnet3Decoder so the changes in my fork should be the "right" way to do this. |
With the latest merge this issues should be resolved. |
Hi
I would love to hear if you (or anyone else) has any suggestions. |
I download the latest version of Kaldi today from Github, compiled it and ran a quick test. Everything worked fine for me so it looks like this code works with the latest Kaldi and the model it was written to run (see https://github.com/dialogflow/api-ai-english-asr-model). As far as integrating new models, I'm not familiar enough with Kaldi to make any suggestions. |
There's a few issues with building this code against the latest Kaldi.
has changed. It now takes a LatticeFasterDecoderConfig instead of a OnlineNnet3DecodingConfig
and a nnet3::DecodableNnetSimpleLoopedInfo instead of a nnet3::AmNnetSimple
I was able to do a hack fix by finding an older version of online-nnet3-decoding.cc/.h and online-nnet3-decodable-simple.cc/.h and changing the include/Makefile to use the local version instead.
I also had to comment out computer.Forward() in online-nnet3-decodable-simple.cc because the new Kaldi lib doesn't seem to have this method (and I'm not sure yet what the impact will be).
It looks like a real fix shouldn't be too hard but I'm not very familiar with Kaldi so I'd need to do a bunch of digging before I could switch the classes around to use the new lib correctly.
These changes may be enough to get things to work for me. At this point it does compile and link but I haven't gotten it fully running yet.
The text was updated successfully, but these errors were encountered: