PyAudio IOError: No Default Input Device Available

后端 未结 5 2188
臣服心动
臣服心动 2020-12-06 04:11

I\'m using PyAudio under the Enthought Python Distribution (Python 2.6.6) in Ubuntu 10.10 x64.

>>> import pyaudio
>>> pa = pyaudio.PyAudio(         


        
5条回答
  •  粉色の甜心
    2020-12-06 05:14

    I would recommend PYO for audio I/O and synthesis, I found it really easy to pick up. Here's some code to illustrate how I would get PYO to get and output an audio input after processing it to change it's pitch:

    from pyo import *
    serv = Server(duplex=1).boot()
    serv.start()
    shiftfreq = 329.63
    # 329.63 is the frequency for the E note
    mic = Input(chnl=0)
    shift = FreqShift(mic, shift=shiftfreq, mul=.5).out()
    serv.gui(locals())
    

    PYO also lets you change frequencies and parameters of synthesis, generators or anything on the fly, which was the biggest draw for me because I use it mostly for programming live synthesiser instruments.

    It also has a great manual...

提交回复
热议问题