lmccart / noodle

15 stars 2 forks source link

python mic input is broken #9

Closed kylemcdonald closed 10 years ago

kylemcdonald commented 10 years ago

this is because the wrong device is being used.

find_input_device tries to autodetect the right device, but it only looks for for keyword in ["mic","input"]: while the devices are:

Device 0: bcm2835 ALSA: bcm2835 ALSA (hw:0,0)
Device 1: Blue Snowflake: USB Audio (hw:1,0)
Device 2: sysdefault
Device 3: default
Device 4: dmix

so if we change that line to `for keyword in ["mic","input","Snowflake"] then we should be good.

alternatively, we can hardwire the input device to input_device_index=1 in self.pa.open, but this is less flexible.

also, the CHUNK should probably be lower than 1024 for the rpi, more like CHUNK = 512 according to various forum posts.

kylemcdonald commented 10 years ago

should have been lowercase "snowflake", otherwise correct. closed by e2c1ed364dedf06e96cd013fde2e0ca2ac1b3968