I have just installed pHat speaker that I got from Pimoroni on my Raspberry B v3 running latest raspbian OS.
When running the test suggested on https://shop.pimoroni.com/products/speaker-phat I get the following error.
I am not a python programmer and need some help please.
testing text-to-speech
testing VU meter
Traceback (most recent call last):
File “/home/pi/Pimoroni/speakerphat/test/test.py”, line 9, in
import speakerphat
ImportError: No module named speakerphat
I have yet to get a peep out of the speaker…
and when I attempt the following it still fails
pi@RPiAIY2:~ $ sudo pip install speakerphat
Collecting speakerphat
Could not find a version that satisfies the requirement speakerphat (from versions: )
No matching distribution found for speakerphat
apparently cut n paste does not work so well. Ill try again.
ls /home/pi/Pimoroni/speakerphat
client.conf daemon.conf default.pa python python-backup system.pa test test-backup
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default
Playback/recording through the PulseAudio sound server
pivumeter
softvol_and_pivumeter
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dac,
Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dac,
Hardware device with all software conversions
No sound just lights.
Please see the new message hopefully above where I point out that I have not soldered the 40 pin header just the speaker as I need to get to the GPIO pins.
_ File “test.py”, line 9, in _
_ import speakerphat_
_ ImportError: No module named speakerphat_
Trying to install gives me:
Could not find a version that satisfies the requirement speakerphat (from versions: ) No matching distribution found for speakerphat
If I run “speaker-test -c2” I get a few seconds of static, then a short pause, then a very short period of static, then:
speaker-test 1.1.3
Playback device is default Stream parameters are 48000Hz, S16_LE, 2 channels Using 16 octaves of pink noise Rate set to 48000Hz (requested 48000Hz) Buffer size range from 96 to 1048576 Period size range from 32 to 349526 Using max buffer size 1048576 Periods = 4 was set period_size = 262144 was set buffer_size = 1048576
_ 0 - Front Left_
_ 1 - Front Right_ Time per period = 6.535903
_ 0 - Front Left_ Write error: -5,Input/output error xrun_recovery failed: -5,Input/output error Transfer failed: Input/output error
No lights show on the front.
I have only wired up the pins specified here: pinout.xyz/pinout/speaker_phat as I too need the GPIO pins for other things.