12

I am getting an error using espeak. Audio comes out the head phone jack, but all of this stuff get written to the command line. I installed espeak and alsa-utils. Any idea how to fix these errors?

[kevin@raspberrypi ~]$ sudo espeak "hello"
[sudo] password for kevin: 
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_direct.c:877:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access
ALSA lib pcm_dmix.c:1030:(snd_pcm_dmix_open) unable to initialize slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
5
  • What's the problem? You say it's working?
    – Jivings
    Oct 30 '12 at 22:17
  • Yes, I get audio, however it typically is not normal to have all of these warnings and errors printed to the command line. I would like to fix this.
    – kevin
    Oct 30 '12 at 23:44
  • I am getting the same error messages but the audio is not normal. There is always a delay at the start of each sentence. Can anyone help, please?
    – user3475
    Nov 28 '12 at 12:18
  • What do you mean "not normal"?
    – kevin
    Dec 17 '12 at 22:53
  • related: unix.stackexchange.com/q/76025/82256
    – Ghanima
    Aug 6 '16 at 20:30
5

Here is the short solution:

sudo espeak "hello" 2>/dev/null

Here is my explanation:

The output you're seeing is normal.

Jack is an audio server and the errors report that Jack is not installed. There's nothing wrong with this, espeak will just use a different audio engine such as ALSA or Pulse. In your case it looks like it's using ALSA.

The above command will just hide the output from you.

5
  • Doesn't that mean espeak is being a bit too verbose and printing it out to stderr poorly? If it's not really an error, anyway. Nov 6 '12 at 22:46
  • @Shurane Yes it is.
    – Jivings
    Nov 7 '12 at 8:56
  • Is it possible to get audio output to HDMI and not to head phone jack?
    – avra
    Dec 9 '12 at 21:29
  • 1
    @avra That should happen by default if your HDMI device supports it. If not then there should be something in the espeak documentation.
    – Jivings
    Dec 9 '12 at 21:36
  • Yes it does work after all. My mistake.
    – avra
    Dec 17 '12 at 11:21
3

You can get rid of the annoying messages about jack by running the jack server with the following command line:

jackd -r -m -p 8 -d dummy

I put this in my ~/.config/autostart/jackd.desktop

[Desktop Entry]

Type=Application

Name=jackd

Exec=jackd -p 8 -r -m -d dummy > /dev/null 2>&1

StartupNotify=false
2

Found the answer for this here:

http://alexpb.com/notes/articles/2012/11/14/error-when-playing-audio-on-raspbian-on-a-raspberry-pi/

in

/usr/share/alsa/alsa.conf 

   change the line "pcm.front cards.pcm.front"
             to "pcm.front cards.pcm.default"

worked for me. Can't tell if there is other better solution.

1
  • The link is dead
    – Besi
    Jan 29 '18 at 17:08
0

Turns out pulseaudio ruins ALSA. For me, espeak worked with 'sudo' only. After apt-get --purge remove pulseaudio, things got back to normal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.