VoxForge
After using Julius for what seems like years, I had to install the latest version after a system upgrade and all of a sudden my bluetooth USB devices would not work with Julius. Imagine, you have everything set up as before (including '-input mic') and <please speak> stares you in the face and does not move as you speak into the mike.
Tested device with:
$ arecord | aplay
and it repeated back what I said no problem at all. So mike is ok.
In julian.jconf there is a note that you can now set the audio device with the AUDIODEV environment variable. This takes the form of
$ AUDIODEV=/dev/????
$ export AUDIODEV
where ???? is the device that you are using.
I guessed at /dev/dsp0 and it worked first time. Evidently a simple '-input mic' is no longer enough at least in a USB/BT context.
Problem is that is not very scientific. You can't suggest to people that they randomly go through all the /dev/* trying all 198 alternatives until it works. Anyone suggest a more rigorous way of finding out what audio devices you are currently using and what /dev device is the correct one to use?
Edit: Found some good info at
http://tldp.org/HOWTO/Sound-HOWTO/x504.html
which reduces the number of /dev options quite a bit.
--- (Edited on 5/27/2011 4:17 am [GMT-0500] by colbec) ---
Another couple of details on this subject:
I'm using pulseaudio which I assumed was taking care of selecting the audio device. Not always. I have multiple audio input channels possible and even though PA has only one active, Julius is capable of using a non-active device.
Say my system motherboard audio is /dev/dsp0, mike in USB video cam is present but not active, and headset is present and active. With PA showing mobo and videocam off, headset on, arecord and aplay respect this info. PA manager shows that videocam is device 1 and headset is device 2. So correct instruction to use headset with Julius is
AUDIODEV=/dev/dsp2
Otherwise using /dev/dsp1 has the videocam picking up the sounds. Results were not very good!
--- (Edited on 6/4/2011 4:06 pm [GMT-0500] by colbec) ---
Hi colbec,
I was able to replicate your error in Julius version 4.1.5:
$ julius -input mic -C julian.jconf
### read waveform input
Stat: adin_oss: device name = /dev/dsp (application default)
Error: adin_oss: failed to open /dev/dsp
failed to begin input stream
The problem seems to be fixed in Julius version 4.2 (binary download from Julius site):
$ julius-4.2 -input mic -C julian.jconf
### read waveform input
Stat: capture audio at 16000Hz
Stat: adin_alsa: latency set to 32 msec (chunk = 512 bytes)
Error: adin_alsa: unable to get pcm info from card control
Warning: adin_alsa: skip output of detailed audio device info
STAT: AD-in thread created
<<< please speak >>>Warning: strip: sample 0-20 has zero value, stripped
Ken
--- (Edited on 6/7/2011 12:25 pm [GMT-0400] by kmaclean) ---
Ken, IIUC /dev/dsp is just a link to your default device, whatever the system thinks that might be. Sometimes I can luck out on that and end up with the correct device, other times not.
I have at least 6 different audio devices on this machine, three permanently connected and three others that come and go as required. So dsp0, dsp1 and dsp2 are sort of stable (depending on how they are seen on boot) but quite often I have a dsp3 in use which could be one of three BT headsets. It's not really reliable to assume that /dev/dsp can keep up with what pulseaudio is managing.
I'm using the 4.2 of Julius and still run into problems, which are generally sorted out provided I keep AUDIODEV with the correct value of /dev/dspx. It's a pity that Julius is still not quite as synchronized with the overall system and can follow what pulseaudio is dictating.
--- (Edited on 6/19/2011 7:25 am [GMT-0500] by colbec) ---
OK I have some more info here, but the waters remain muddy.
It seems that AUDIODEV and /dev/dspX stuff is related to OSS. Julius is capable of working with ALSA (using env. var. ALSADEV) and pulseaudio (when compiled with ./configure --with-mictype=pulseaudio
When I try the precompiled version from Julius site, the recognizer still starts out with references to OSS and /dev/dspX type input references so I guess it is defaulting to OSS and relying on emulation.
I have tried recompiling Julius with the pulseaudio reference but the configure errors out. I have posted a query over at Julius forum.
--------------
checking for alsa/asoundlib.h... (cached) no
checking for sys/asoundlib.h... (cached) no
checking for sys/soundcard.h... (cached) yes
checking for esd.h... (cached) no
checking for pa_simple_new in -lpulse-simple... (cached) no
configure: error: no PulseAudio header!
configure: error: ./configure failed for libsent
--------------
I'll try to keep this updated.
--- (Edited on 6/20/2011 11:58 am [GMT-0500] by colbec) ---
Hi Ken, I'm finally on track now with the precompiled version. I missed the little detail that the programme is now called with "julius-4.2" and not just Julius. No wonder I was still getting the references to OSS, I was calling the old (my compiled) version.
Unfortunately there doesn't seem to be a "make uninstall" for Julius to clean out old versions.
Now with:
export ALSADEV=pulse
Julius now respects whatever I have set as the active device in pulseaudio, BT headsets included.
My initial impression is that my recognition accuracy has gone up a notch. Some words which were consistently a problem (SIX, SEVEN, SIERRA, ALPHA) are now occasionally recognized.
--- (Edited on 6/21/2011 6:10 am [GMT-0500] by colbec) ---
I tried compiling my own 4.2 version from downloaded source, however I ran into an issue with configure not able to find pulseaudio headers even though they clearly exist. This problem went away when I downloaded the CVS version and configured it. Compiling from CVS puts me back to 'julius' and not 'julius-4.2'.
Speech recognition with Julius has returned to just a tad less than 100% accurate. One single prompt is giving me an issue, but I'm working on adjusting phonemes which is having a positive effect.
--- (Edited on 6/29/2011 4:13 am [GMT-0500] by colbec) ---
Hi, I’m pretty new using Julius engine. I’m trying to make it work but I’m getting this error. Do you have an idea about the problem here? I appreciate.
curenahe@debian:/usr/local/bin$ julius-4.2 -input mic -C julian.jconf
STAT: include config: julian.jconf
ERROR: m_chkparam: cannot access hmm15/hmmdefs
ERROR: m_chkparam: cannot access ./tiedlist
ERROR: m_chkparam: could not pass parameter check
curenahe@debian:/usr/local/bin$
--- (Edited on 7/15/2011 12:29 pm [GMT-0500] by curenahe) ---
>ERROR: m_chkparam: cannot access hmm15/hmmdefs
>ERROR: m_chkparam: cannot access ./tiedlist
these are parameters in your julian.jconf configuration file. make sure your hmmdefs and tiedlist files are located in the paths you specify in the Julius configuration file.
--- (Edited on 7/18/2011 8:51 pm [GMT-0400] by kmaclean) ---