Författare:
Per Stenebo
Skapad:
2019-07-28 15:39:22
Ändrad:
2019-07-28 17:55:01
en

Sound in Raspberry Pi

Sound output thru HDMI or 3.5 mm stereo jack.
Output target are configurable using raspi-config, Advanced/Audio.

Check if kernel module are loaded:

lsmod | grep snd_bcm2835

snd_bcm2835            24576  0
snd_pcm               102400  1 snd_bcm2835
snd                    73728  3 snd_timer,snd_bcm2835,snd_pcm

Set volume, use up/down arrow keys:

alsamixer

Test output:

aplay /usr/share/sounds/alsa/*

Text to Speech (Speech Synthesis)

| elinux

festival

Install festival - a text-to-speech system:

sudo apt install festival

Test with something like: echo "Hello world!" | festival --tts

espeak

Install espeak, a multi-lingual software speech synthesizer:

sudo apt install espeak

Test with:

espeak "Hello World. So I just installed espeak on to my pi." 2>/dev/null

However, I was unable to get espeak to work on my Pi with Raspbian Stretch. It was completly silent whatever I tried. But festival worked.

 

Kommentarer till sidan Sound