amsehili / auditok

An audio/acoustic activity detection and audio segmentation tool
MIT License
732 stars 94 forks source link

Specify recording device #5

Closed Simpler1 closed 8 years ago

Simpler1 commented 8 years ago

I have multiple recording devices on my system, but is seems to only pick up the mic plugged in to the microphone jack. How can I get it to use the microphone on the webcam that is plugged into a USB port?

I tried inserting the following at line 354 of io.py: input_device_index = 2, but it didn't have any effect.

I'm not very familiar with Python, but this looks like the right place according to the PyAudio documentation.

amsehili commented 8 years ago

Try specifying the default mic in your system settings Have you installed your modified version after your code update ? (sudo python setup.py install)

Simpler1 commented 8 years ago

Thanks for the feedback. I was specifying the wrong device index. I found the correct device index by running the following https://gist.github.com/mansam/9332445

I'm now able to set the input_device_index in the io.py file.

Thanks again.

amsehili commented 8 years ago

Thanks for finding that out. Will add this feature in next release so one can specify device id from the command line