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
Jivings
  • 22,538
  • 11
  • 90
  • 139
kevin
  • 1,294
  • 3
  • 14
  • 26

4 Answers4

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.

Jivings
  • 22,538
  • 11
  • 90
  • 139
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
RPiAwesomeness
  • 3,001
  • 4
  • 30
  • 51
user13029
  • 31
  • 1
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.

mjk
  • 21
  • 1
0

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

Chris
  • 1