Speech Recognition Engines

Nested
julius and alsa strange behavior
User: brunal2496
Date: 1/21/2008 9:28 am
Views: 8391
Rating: 31

Hi,

 Does anybodu have experiences about using alsa sound card driver with julius (v4.0 and 3.5.3)?

 I've used julius 4.0 (and before julian) with my internal soundcard without any problem and I've discovered a strange behavior recently when trying to use an external usb soundcard alsa complient :

I compile and configure julius with the --with-mictype=alsa option and I get the right message at the end of configure saying "mic device API         : alsa (Advanced Linux Sound architecture)".

But when I launch julius using -input mic option I get this jlog message :

"STAT : ###### initialize input device"

"Stat : adin_oss : device name = /dev/dsp" [...] 

which means oss is used instead of alsa, because this log message can only comes from the adin_mic_linux_oss.c file.

I've tried to understand where is the problem in the configure/make script of julius, but I've not been able to see it.

 Any idea? 

--- (Edited on 1/21/2008 9:28 am [GMT-0600] by brunal2496) ---

Re: julius and alsa strange behavior
User: nsh
Date: 1/21/2008 10:45 pm
Views: 325
Rating: 35
Everything works fine for me. Probably you have to recompile it from            
clean source. Or you miss some alsa development header and thus it              
choose oss as a fallback. Or you are using older version from a                 
different place.                                                                
                                                                                
Please check that the following lines are present in libsent/config.status      
                                                                                
s%@EXTRAOBJ@% src/adin/adin_mic_linux_alsa.o%g                                  
s%@EXTRALIB@% -lz%g                                                             
s%@SOUNDINC@%%g                                                                 
s%@SOUNDLIB@%-lasound%g                                                         
                                                                                
And that you have src/adin/adin_mic_linux_alsa.o in libsent/Makefile.

--- (Edited on 1/21/2008 10:45 pm [GMT-0600] by nsh) ---

Re: julius and alsa strange behavior
User: brunal2496
Date: 1/22/2008 4:35 am
Views: 240
Rating: 35

Hi nsh, 

 thanks for your pointers. I checked everything as you told me and at the end it works. I think my error was to not use "sudo make distclean" but only "make clean" between two essay.

Now I have the error

"Warning: adin_alsa: the rate 16000 Hz is not supported by your PCM hardware.


Warning: adin_alsa: using 44100 Hz instead.

Stat: adin_alsa: sampling rate is 44100Hz

 

Error: adin_alsa: monoral recording not supported on this device/driver"

Unfortunetly I have the same when I try to use the "-48" option to use 48khz sampling rate. I know my soundcard is able to do 16khz, 32khz, 44.1khz, 48khz and 96khz.

But the main error here is that monoral recording is not supported by this device : I found it strange as audacity doesn't complain when I record only 1 mono channel with the alsa driver.

Is there a way to trick it? 

 

--- (Edited on 1/22/2008 4:35 am [GMT-0600] by brunal2496) ---

Re: julius and alsa strange behavior
User: nsh
Date: 1/22/2008 5:33 pm
Views: 252
Rating: 25

It looks like Julius just doesn't work with alsa. I've changed device name from hw:0,0 to default in sources to work with dmix and commented out a code for snd_pcm_hw_params_set_periods and after all it started work. I suppose they work with alsa-0.9 as mentioned in the source while currently very different 1.0.11 is in use.

So it's a good reason to report a bug or test newly created Julius support forum. 

--- (Edited on 1/22/2008 5:33 pm [GMT-0600] by nsh) ---

Re: julius and alsa strange behavior
User: brunal2496
Date: 1/23/2008 5:26 am
Views: 2792
Rating: 40

Oh thanks for the information, I didn't know about the new forum for Julius! Cool.

 So for those who wants to know here is the adress : 

http://julius.sourceforge.jp/forum/index.php

I'll first test the newly created forum and then report a bug if needed and I'll also make some test as yours to know if we can manage alsa to work without big change in the code (or I will to do it anyway, so i'll post the working version). 

--- (Edited on 1/23/2008 5:26 am [GMT-0600] by brunal2496) ---

PreviousNext