Hello, I have two questions about pyaudio.
1. Can I set the input stream's volume without affecting the system's global microphone volume setting? So like teamtalks microphone gain setting where you can control microphone volume without changing it from the control pannel. I looked pyaudio's functions, but didn't came across such function.
2. I want to add input device selection support to my project, but pyaudio shows duplicates of the same devices. Why this could be? I run this code
import pyaudio
p = pyaudio.PyAudio()
for i in range(p.get_device_count()):
device_info = p.get_device_info_by_index(i)
device_name_lower = device_info['name'].lower()
print(f"{device_info['name']} - Channels: {device_info['maxInputChannels']} input, {device_info['maxOutputChannels']} output")
And here's what I get (the some device names are in turkish)
Microsoft Sound Mapper - Input - Channels: 2 input, 0 output
Stereo Kar─▒┼ş─▒m─▒ (Realtek High D - Channels: 2 input, 0 output
Mikrofon (Realtek High Definiti - Channels: 2 input, 0 output
Mikrofon (WO Mic Device) - Channels: 1 input, 0 output
Microsoft Sound Mapper - Output - Channels: 0 input, 2 output
Hoparl├Âr (Realtek High Definiti - Channels: 0 input, 2 output
Birincil Ses Yakalama S├╝r├╝c├╝s├╝ - Channels: 2 input, 0 output
Stereo Kar─▒┼ş─▒m─▒ (Realtek High Definition Audio) - Channels: 2 input, 0 output
Mikrofon (Realtek High Definition Audio) - Channels: 2 input, 0 output
Mikrofon (WO Mic Device) - Channels: 1 input, 0 output
Birincil Ses S├╝r├╝c├╝s├╝ - Channels: 0 input, 2 output
Hoparl├Âr (Realtek High Definition Audio) - Channels: 0 input, 2 output
Hoparl├Âr (Realtek High Definition Audio) - Channels: 0 input, 2 output
Stereo Kar─▒┼ş─▒m─▒ (Realtek High Definition Audio) - Channels: 2 input, 0 output
Mikrofon (Realtek High Definition Audio) - Channels: 2 input, 0 output
Mikrofon (WO Mic Device) - Channels: 1 input, 0 output
Speakers (Realtek HD Audio output) - Channels: 0 input, 2 output
Stereo Kar─▒┼ş─▒m─▒ (Realtek HD Audio Stereo input) - Channels: 2 input, 0 output
Mikrofon (Realtek HD Audio Mic input) - Channels: 2 input, 0 output
Microphone (WO Mic Wave) - Channels: 1 input, 0 output
And the weird thing is some duplicates have incomplete names like realtek high definiti, but the other duplicates of the same defice have the complete name realtek high definition audio.
And If I try to open a stream with the duplicate devices, it doesn't work, only the first instance of each device work. For example, for the realtek microphone, only the first instance with the incomplete name realtek high definiti work. How can I fix this issue? so my code should only show 1 instance of each device, as I will present the user with a menu so they can choose what device they want to use.
Regards...
Bilal