1

I am using pyaudio now. But my computer doesn't have WASAPI. So I can't use loopback.

#Select Device
        for i in range(0, self.virtual_p.get_device_count()):
            info = self.virtual_p.get_device_info_by_index(i)
   
            if info['name'] == 'Line 1 (Virtual Audio Cable)' and \
                    self.virtual_p.get_host_api_info_by_index(info["hostApi"])["name"] == 'Windows WASAPI' and \
                    info['maxInputChannels'] == 0:
                device_id = i
                continue
            if info['name'].split('(')[0].strip() == self.default_device_name and \
                    self.virtual_p.get_host_api_info_by_index(info["hostApi"])["name"] == 'Windows WASAPI' and \
                    info['maxInputChannels'] == 0:
                device_id1 = i

This is my audio device list.

(base) C:\Users\Ivan>python -m sounddevice
   0 Microsoft Sound Mapper - Input, MME (2 in, 0 out)
>  1 Line 1 (Virtual Audio Cable), MME (8 in, 0 out)
   2 Microphone Array (Realtek(R) Au, MME (4 in, 0 out)
   3 AI Noise-cancelling Input (ASUS, MME (2 in, 0 out)
   4 Microsoft Sound Mapper - Output, MME (0 in, 2 out)
<  5 Speakers (Realtek(R) Audio), MME (0 in, 2 out)
   6 Speakers (Virtual Audio Cable), MME (0 in, 8 out)
   7 AI Noise-cancelling Output (ASU, MME (0 in, 2 out)
   8 Microphone (Realtek HD Audio Mic input), Windows WDM-KS (2 in, 0 out)
   9 Headphones (Realtek HD Audio 2nd output), Windows WDM-KS (0 in, 2 out)
  10 Microphone Array (Realtek HD Audio Mic Array input), Windows WDM-KS (4 in, 0 out)
  11 Speakers 1 (Realtek HD Audio output with HAP), Windows WDM-KS (0 in, 2 out)
  12 Speakers 2 (Realtek HD Audio output with HAP), Windows WDM-KS (0 in, 2 out)
  13 PC Speaker (Realtek HD Audio output with HAP), Windows WDM-KS (2 in, 0 out)
  14 Line Out (Virtual Cable 1), Windows WDM-KS (0 in, 8 out)
  15 Mic 1 (Virtual Cable 1), Windows WDM-KS (8 in, 0 out)
  16 Line 1 (Virtual Cable 1), Windows WDM-KS (8 in, 0 out)
  17 S/PDIF 1 (Virtual Cable 1), Windows WDM-KS (8 in, 0 out)
  18 Line (), Windows WDM-KS (2 in, 0 out)
  19 AI Noise-cancelling Input (Intelligo VAC (W)), Windows WDM-KS (2 in, 0 out)
  20 Line Out 1 (Intelligo VAC (W)), Windows WDM-KS (0 in, 2 out)
  21 System Virtual Line (Intelligo VAC (W)), Windows WDM-KS (2 in, 0 out)
  22 Line Out 2 (Intelligo VAC (W)), Windows WDM-KS (0 in, 2 out)
  23 Output (@System32\drivers\bthhfenum.sys,#4;%1 Hands-Free HF Audio%0
;(Darin's Galaxy S20 FE 5G)), Windows WDM-KS (0 in, 1 out)
  24 Input (@System32\drivers\bthhfenum.sys,#4;%1 Hands-Free HF Audio%0
;(Darin's Galaxy S20 FE 5G)), Windows WDM-KS (1 in, 0 out)

I can't find WASAPI. Please give me a way to solve these issues.

azvast
  • 337
  • 4
  • 10
  • HI @GoldenStar - does this help you https://stackoverflow.com/questions/31306010/how-to-enable-wasapi-exclusive-mode-in-pyaudio ? If not please explain what you have tried and what wasn't working about it. – Mr R Apr 02 '21 at 03:52

0 Answers0