I want to develop a speech recognition program on a robot. The robot has gentoo chroot installed. When I call AudioSystem.getMixerInfo()
, it returns nothing.
The JDK version is jdk-6u35-linux-i586. There are many audio device in /dev/, as list below:
nao [0] /dev $ ls -l|grep audio
crw-rw---- 1 root audio 14, 4 Oct 3 02:33 audio
crw-rw---- 1 root audio 14, 3 Oct 3 02:33 dsp
crw-rw---- 1 root audio 14, 0 Oct 3 02:33 mixer
crw-rw---- 1 root audio 14, 1 Oct 3 02:33 sequencer
crw-rw---- 1 root audio 14, 8 Oct 3 02:33 sequencer2
Is there some config of linux or Java must be set for sound?
The package for that version of Java has an alsa USE flag. It is not clear whether it also has implicit support for OSS. The devices you listed are for OSS. You shouldn't use native OSS these days unless you know what you're doing so check whether the alsa USE flag is enabled and that you have devices present in /dev/snd. aplay -L
should return something useful.