virtual mic with python

Solutions on MaxInterview for virtual mic with python by the best coders in the world

showing results for - "virtual mic with python"
Salomé
09 Jan 2019
1>>> from pygame._sdl2 import get_num_audio_devices, get_audio_device_name #Get playback device names
2>>> from pygame import mixer #Playing sound
3>>> mixer.init() #Initialize the mixer, this will allow the next command to work
4>>> [get_audio_device_name(x, 0).decode() for x in range(get_num_audio_devices(0))] #Returns playback devices
5['Headphones (Oculus Virtual Audio Device)', 'MONITOR (2- NVIDIA High Definition Audio)', 'Speakers (High Definition Audio Device)', 'Speakers (NVIDIA RTX Voice)', 'CABLE Input (VB-Audio Virtual Cable)']
6>>> mixer.quit() #Quit the mixer as it's initialized on your main playback device
7>>> mixer.init(devicename='CABLE Input (VB-Audio Virtual Cable)') #Initialize it with the correct device
8>>> mixer.music.load("Megalovania.mp3") #Load the mp3
9>>> mixer.music.play() #Play it
10