mycroft-precise icon indicating copy to clipboard operation
mycroft-precise copied to clipboard

Raspberry Pi4 Buster precise-listen - choose a different device index input

Open varungujjar opened this issue 5 years ago • 2 comments

After hours i managed to install all the requirements on my raspberry pi 4 buster..and get some things running.. although i managed to change the device_index= for precise-collect & the correct soundcard microphone recording files works fine . but when i choose precise-listen with model.pb file it does not detect any sound input .. since my soundcard is on another index .. is there a way to change the card index .. ?

XX------------------------------------------------------------------------------




varungujjar avatar Feb 20 '20 17:02 varungujjar

You can hardcode input_device_index=MY_INDEX in right here. Alternatively, if you'd like to submit a pull request, you'd want to pass a custom stream=stream into here where the custom stream is:

stream = PyAudio().open(
    16000, 1, paInt16, True, frames_per_buffer=self.chunk_size,
    input_device_index=args.input_device_index
)

with a new :-idi --input-device-index - field in the usage string.

MatthewScholefield avatar Feb 20 '20 23:02 MatthewScholefield

You can hardcode input_device_index=MY_INDEX in right here. Alternatively, if you'd like to submit a pull request, you'd want to pass a custom stream=stream into here where the custom stream is:

stream = PyAudio().open(
    16000, 1, paInt16, True, frames_per_buffer=self.chunk_size,
    input_device_index=args.input_device_index
)

with a new :-idi --input-device-index - field in the usage string.

thankx Matthew that works :D

varungujjar avatar Feb 21 '20 05:02 varungujjar