I am using Ubuntu 13.04...having ALSA sound problems with Python.

  1. using aplay, I can play a *.wav from the command line - works fine
  2. other apps using sound card - work fine
  3. I am using Python 2.7; I have installed several Python alsa packages.... but not working for me

Here is what I currently have, regarding ALSA:

sudo dpkg --get-selections | grep alsa

alsa-base                           install
alsa-utils                  install
bluez-alsa:i386                 install
gnome-alsamixer                 install
gstreamer0.10-alsa:i386             install
gstreamer1.0-alsa:i386              install
python-alsaaudio                        install
python-pyalsa                   install

I could send along lots of others info but not sure relevant.

If you could make a few suggestions of things to check, I will get busy...

Not working -> 1) python gives no errors, plays the file, I hear no sound. 2) from the Desktop, go to Sound, Test -> works fine 3) from the command line, use aplay + way file, works fine

Conclusion: Python2.7 + Ubuntu + ALSA -> does not work -> does not play the WAV sound file correctly -> I hear nothing


I wrote a simple python2/python3 program to use mpg321 and/or aplay for Raspberry Pi using Whezzy- side note added GUI buttons to start and stop audio

in python os.system('aplay Song.wav &')

must use & or it does not work not sure why

for mpg321 os.system('mpg321 Song.mp3 &')

Check your master volume if you do not hear anything from command line amixer cset numid=1 80% to increase volume

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.