julius-speech / julius

Open-Source Large Vocabulary Continuous Speech Recognition Engine
BSD 3-Clause "New" or "Revised" License
1.84k stars 300 forks source link

Read from recorded file works, but directly from mic doesn't #156

Open leledumbo opened 3 years ago

leledumbo commented 3 years ago

I'm testing the Quick Run (implicitly using jconf written there), for my own file I use the following to record:

$ parecord --rate=16000 --channels=1 test.wav

then change test.dbl content accordingly, replacing mozilla.wav with test.wav. This works fine and julius recognize at least many of the words. However, when using mic directly using this config:

-input pulseaudio
-htkconf wav_config
-h ENVR-v5.3.am
-hlist ENVR-v5.3.phn
-d ENVR-v5.3.lm
-v ENVR-v5.3.dct
-b 4000
-lmp 12 -6
-lmp2 12 -6
-fallback1pass
-multipath
-iwsp
-iwcd1 max
-spmodel sp
-no_ccd
-sepnum 150
-b2 360
-n 40
-s 2000
-m 8000
-lookuprange 5
-sb 80
-forcedict

julius cannot recognize any of the words I say, it always ends with <input rejected by power>. My guess would be pulseaudio mic as initiated by julius doesn't use 16KHz sampling rate and mono channel like above, but I can't find any option to pass it to the pulseaudio.

Diff-ing the two jconf-s, there's only so little differences:

                   input source = waveform file               |                    input source = microphone
                  input filelist = test.dbl                   |             device API          = pulseaudio
                  sampling freq. = 16000 Hz required          |                   sampling freq. = 16000 Hz
                 threaded A/D-in = supported, off             |                  threaded A/D-in = supported, on
palles77 commented 3 years ago

Your message 'input rejected by power' suggests that your microphone audio level gain is too low. Try using 'SkryBot Domowy' from SourceForge to tune your microphone to proper levels.

leledumbo commented 3 years ago

Dang, I somehow missed your reply, apologize for that.

That's weird as my microphone volume is maxed out and parecord confirms that, but I'll still try your suggestion.

EDIT: Cannot proceed, "SkryBot Domowy" is Windows only as I'm on Linux.

jakecoble commented 3 years ago

Having the same trouble. Tried a few things without success. Verified with adintool that Julius is hearing my microphone at normal levels, so the power level error is puzzling.