alsa-project/alsa-lib issue #13 was edited from paddygoat:
Hello again!
I upgraded Alsa lib to 1.1.7 and tested ok. A small error as below when running in Jupyter Notebook, Python 3.6::
`#inp = alsaaudio.PCM(alsaaudio.PCM_CAPTURE, alsaaudio.PCM_NONBLOCK) # UltraMic384K 16bit r0, USB Audio
inp = alsaaudio.PCM(type = alsaaudio.PCM_CAPTURE, mode=alsaaudio.PCM_NORMAL, device='UltraMic384K 16bit r0') # class alsaaudio.PCM(type=PCM_PLAYBACK, mode=PCM_NORMAL, device='default', cardindex=-1)`
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-6-947bfb637aff> in <module> 16 modelName="randomforestPaddyFalse" 17 modelType="randomforest" ---> 18 recordAnalyzeAudio(10, outputWavFile, 2.0, modelName, modelType)
<ipython-input-5-8ddddfa5b724> in recordAnalyzeAudio(duration, outputWavFile, midTermBufferSizeSec, modelName, modelType) 87 # UltraMic384K 16bit r0, USB Audio 88 ---> 89 inp = alsaaudio.PCM(type = alsaaudio.PCM_CAPTURE, mode=alsaaudio.PCM_NORMAL, device='UltraMic384K 16bit r0') 90 # class alsaaudio.PCM(type=PCM_PLAYBACK, mode=PCM_NORMAL, device='default', cardindex=-1) 91 inp.setchannels(2)
TypeError: 'device' is an invalid keyword argument for this function
Thanks!
Issue URL : https://github.com/alsa-project/alsa-lib/issues/13 Repository URL: https://github.com/alsa-project/alsa-lib