biemster / gasr

Google Chrome SODA Offline Speech Recognition command line client
https://hackaday.io/project/164399-android-offline-speech-recognition-natively-on-pc
150 stars 18 forks source link

No Output When Using Wave File As Input! #3

Closed ElijahHamilton closed 3 years ago

ElijahHamilton commented 3 years ago

I am getting no output when running. All I get is errors. OS: Windows 10 Pro 64 Bit. Compiler: Mingw.

Command: cat input.wav | ./gasr.exe W0308 20:07:06.567934 9352 soda_async_impl.cc:260] Creating soda_impl W0308 20:07:06.642911 9352 terse_processor.cc:1704] SODA could not build Hotquery Matcher. W0308 20:07:06.643006 9352 terse_processor.cc:279] TISID disabled. W0308 20:07:06.648956 14340 portable_intended_query_stream.cc:235] Exiting due to stream cancellation. W0308 20:07:06.648949 9560 incremental_result.cc:218] UNKNOWN: Result lattice is not set. [type.googleapis.com/util.ErrorSpacePayload='SpeechErrorSpace::SpeechError(-73542)'] W0308 20:07:06.649882 9352 soda_async_impl.cc:419] Soda session starting (require_hotword:0, hotword_timeout_in_millis:0, trigger_type:TRIGGER_TYPE_UNSPECIFIED, hybrid_asr_config.mode:MODE_DEFAULT) W0308 20:07:06.650622 5264 soda_async_impl.cc:1082] SODA received first mic audio buffer, size in bytes: 640, format: 1, channels: 1, : sample rate: 16000 W0308 20:07:06.659870 5264 soda_async_impl.cc:759] SODA stopped processing audio, mics audio processed in millis: 20, loopback audio processed in millis: 0 W0308 20:07:06.660794 10724 incremental_result.cc:218] UNKNOWN: Result lattice is not set. [type.googleapis.com/util.ErrorSpacePayload='SpeechErrorSpace::SpeechError(-73542)'] W0308 20:07:06.660902 2208 portable_intended_query_stream.cc:235] Exiting due to stream cancellation. W0308 20:07:06.661461 5264 soda_async_impl.cc:809] Soda session stopped due to: STOP_CALLED E0308 20:07:06.665140 9352 mapped-file.cc:44] Failed to unmap region: 0 E0308 20:07:06.675662 9352 mapped-file.cc:44] Failed to unmap region: 0 E0308 20:07:06.675687 9352 mapped-file.cc:44] Failed to unmap region: 0 E0308 20:07:06.675711 9352 mapped-file.cc:44] Failed to unmap region: 0 E0308 20:07:06.675723 9352 mapped-file.cc:44] Failed to unmap region: 0 W0308 20:07:06.677309 9352 soda_async_impl.cc:880] Deleting soda_impl

Any ideas on how to get this actually working?

biemster commented 3 years ago

When using file input on the C client you should use the --stream-delay flag to simulate a real-time audio stream. The python client has a flag for this as well in the proto (but I have to look up again how that is called..)

ElijahHamilton commented 3 years ago

I tried the same with --stream-delay and still nothing.

biemster commented 3 years ago

Maybe you did not patch the DLL correctly, or the input wav file is not in the correct format. Could you try this wav file?

ElijahHamilton commented 3 years ago

Sorry, I don't know how to patch the dll file!

ElijahHamilton commented 3 years ago

My input.wav was 16Khz, 16Bit, 1 Channel.

biemster commented 3 years ago

Sorry, I don't know how to patch the dll file!

Well that's the thing then unfortunately. The DLL is not my work, so I can't redistribute a modified version of it. There are plenty pointers on the project page on hackaday, which should enable you to get it working.