1

I have been trying to record my device's audio, but I can't get it to work properly.

So far I have tried the following

from sounddevice import rec, default
from soundfile import write

fs = 48000 # Hz
duration = 10  # s
default.device = [6, 12]

myrecording = rec(int(duration * fs), samplerate = fs, blocking = True, channels = 2)

write("output.mp3", myrecording, fs)

I have tried all sorts of different combinations of the following list:

   0 Microsoft Sound Mapper - Input, MME (2 in, 0 out)
>  1 Stereo Mix (Conexant ISST Audio, MME (2 in, 0 out)
   2 Microphone (Conexant ISST Audio, MME (2 in, 0 out)
   3 Microsoft Sound Mapper - Output, MME (0 in, 2 out)
<  4 Speakers (Conexant ISST Audio), MME (0 in, 2 out)
   5 Primary Sound Capture Driver, Windows DirectSound (2 in, 0 out)
   6 Stereo Mix (Conexant ISST Audio), Windows DirectSound (2 in, 0 out)
   7 Microphone (Conexant ISST Audio), Windows DirectSound (2 in, 0 out)
   8 Primary Sound Driver, Windows DirectSound (0 in, 2 out)
   9 Speakers (Conexant ISST Audio), Windows DirectSound (0 in, 2 out)
  10 Speakers (Conexant ISST Audio), Windows WASAPI (0 in, 2 out)
  11 Microphone (Conexant ISST Audio), Windows WASAPI (4 in, 0 out)
  12 Stereo Mix (Conexant ISST Audio), Windows WASAPI (4 in, 0 out)
  13 Microphone Array (Conexant ISST Audio capture), Windows WDM-KS (4 in, 0 out)
  14 Headphones (Conexant ISST Audio headphone), Windows WDM-KS (0 in, 2 out)
  15 Output 1 (Conexant ISST Audio output), Windows WDM-KS (0 in, 2 out)
  16 Output 2 (Conexant ISST Audio output), Windows WDM-KS (0 in, 8 out)
  17 Input (Conexant ISST Audio output), Windows WDM-KS (2 in, 0 out)

I have tried 4, 8, [6, 12], [1, 6], [1, 12], [15, 16] of which only the combinations with 1, 6 and 12 work, but the sound is very weird. It sounds strangely hollow compared to the original sound.

If I try for example 4, which seems to be the primary output, it whines about not having the correct number of input channels.

Any help would be greatly appreciated!

INGIE
  • 11
  • 1

0 Answers0