Questions tagged [pyalsaaudio]

Questions pertaining to the eponymous library

The pyalsaaudio library is a Python wrapper around the ALSA audio API. This tag is for questions pertaining to the usage and documentation of the library.

16 questions
3
votes
2 answers

alsaaudio library not working

Has the alsaaudio library been ported to python3? i have this working on python 2.7 but not on python 3. is there another library for python 3 if the above cannot be used?
Ossama
  • 2,401
  • 7
  • 46
  • 83
2
votes
1 answer

pyAlsaaudio install on openSUSE

I'm trying to install pyAlsaaudio on my openSUSE distro Output of uname -a: Linux linux-0cd5 4.12.14-lp150.12.48-default #1 SMP Tue Feb 12 14:01:48 UTC 2019 (268f014) x86_64 x86_64 x86_64 GNU/Linux I downloaded the source from this…
rajan
  • 435
  • 3
  • 9
2
votes
1 answer

Taking audio input from PC microphone using python

I am using ubuntu 16.04 and I have to take audio input from my pc microphone. I am using python 3. I used pyalsaaudio. I copied the code from somewhere. Here is the code import alsaaudio, time, audioop inp =…
Aakash aggarwal
  • 443
  • 2
  • 6
  • 21
2
votes
2 answers

How would I add volume on to the current_volume list in pyalsaaudio?

I'm trying to add on volume to a current set volume, in this case we will say it's 80%. Using the alsaaudio module in Python, there is a function called getvolume #declare alsaaudio am = alsaaudio.Mixer() #get current volume current_volume =…
Daquaney
  • 47
  • 7
1
vote
1 answer

Pyalsaaudio recording allowing for huge delay without overrunning the buffer

I want to record audio in realtime on Ubuntu and pyalsaaudio seems to work best for detecting my input devices correctly. I started off with the included recordtest.py script, and wanted to experiment with latency to see when the buffer would fill…
Murph
  • 41
  • 4
1
vote
1 answer

Python3 pyalsaaudio "Deprecated setchannel, setformat, setrate and setperiodsize"

Im just in the process of updating some python programs to work on Python3. One of these uses Alsa Audio and according to their github entry, version 0.9.0 includes: Pyalsaaudio 0.9.0 Added keyword arguments for channels, format, rate and…
1
vote
0 answers

How to get data just from one channel using python and alsaaudio

I am using python 3 and with alsaaudio I read data from microphone but I have to work with each channel separately. So is there a way how to get data just from one channel? Or how to parse data from each channel separately? import wave import…
1
vote
1 answer

What to put for the alsaaudio python card?

I am trying to use alsaaudio in my python code. inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, alsaaudio.PCM_NONBLOCK, card) For the third parameter card, what should I put? root@abc:~/Desktop# arecord --list-devices **** List of CAPTURE Hardware…
wrek
  • 1,061
  • 5
  • 14
  • 26
1
vote
0 answers

Python alsaaudio and pjsip conflict

I writing app in python that uses pocketsphinx and pjsip I use pocketsphinx keyword search to wakeup the app and pjsip as phone the problem is when I try call the "call" function and after that returning to listen to the keyword and then I get an…
LichKing
  • 256
  • 1
  • 2
  • 15
0
votes
0 answers

Alsa Python API: Monitoring the Buffer size or Period

I am new to using Alsa API for sound processing. I am trying to use Alsa API to receive an input, process and send it back to the outout port. I have set the buffer size of 512. Source = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, device = cards,…
user3064089
  • 65
  • 1
  • 3
  • 10
0
votes
1 answer

What does alsaaudio.PCM_FORMAT_MPEG do exactly?

I want to stream audio from my microphone with python (on linux). I used the PyAlsaAudio module, but I got stuck. My code so far: import alsaaudio CHAN = 1 RATE = 44400 PERIOD = RATE * 1 inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, …
Lima
  • 257
  • 1
  • 8
0
votes
0 answers

I am trying to run command aplay and arecord and it does not work also pulseaudio is having some issues

I am trying to run commands like aplay, arecord but I get following error ALSA lib ../../alsa-plugins-1.2.1/pulse/pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Timeout arecord: main:828: audio open error: Connection refused When I tried…
UmeshP
  • 1
  • 1
0
votes
1 answer

Alsa Audio library - Error -> Has no PCM member

I'm working on a project where I have to control 8 audio channel. I'm programming in python3 using alsaaudio library. It all worked but I have these 3 errors and, once I start the program, my internet connection goes down. In the following code, you…
Giulio
  • 150
  • 2
  • 11
0
votes
2 answers

Alsaaudio record and playback

I was just playing around with sound input and output on a raspberry pi using python. My plan was to read the input of a microphone, manipulate it and playback the manipulated audio. At the moment I tried to read and playback the audio. The reading…
Mein Name
  • 527
  • 3
  • 14
0
votes
1 answer

Python alsaaudio capturing sound

I'm trying to capture data from microphone. Code is pretty simple but I get the error alsaaudio.ALSAAudioError: Capture data too large. Try decreasing period size for some reason. Tried google it but nothing... res = [] recoder =…
Long Smith
  • 1,339
  • 3
  • 21
  • 40
1
2