Py Audio Capture is a Python utility script designed for easy audio recording from selected input devices. It prioritizes the Windows Sound Mixer, but if unavailable, focuses on utilizing the VB-Audio Virtual Cable.
- About Python
- About Windows Sound Mixer
- About VB-Cable
- Setting Up Audio Output on Windows
- Using Py Audio Capture
Python is a widely-used programming language known for its clear syntax and readability, which makes it especially good for beginners. Python is versatile and can be used for web development, data analysis, artificial intelligence, scientific computing, and more.
- Go to the official Python website's download section: Python Downloads.
- Download the latest version for Windows.
- Run the installer.
- Ensure the "Add Python to PATH" option is checked.
- Choose "Customize installation".
- Ensure all optional features are selected.
- Ensure "Install for all users" is selected for system-wide installation.
- Proceed and finish the installation.
After installing Python, you will also need to install some additional Python packages which are dependencies for the Py Audio Capture script. These packages can be installed using pip
, the Python package installer.
- Open a command prompt or terminal window.
- Navigate to the directory containing
sourcer.py
. - Run the following command:
pip install sounddevice numpy wavio
This will install the required Python packages, namely sounddevice
, numpy
, and wavio
, which are required to run this script.
Windows Sound Mixer is an integrated feature that allows users to manage audio inputs and outputs. By default, this feature is usually disabled.
- Right-click on the speaker icon in the system tray.
- Select "Sounds".
- Navigate to the "Recording" tab.
- If "Stereo Mix" or "Sound Mixer" is listed but disabled, right-click it and choose "Enable".
- If it's not listed, right-click in an empty space and check both "Show Disabled Devices" and "Show Disconnected Devices". Then, look for "Stereo Mix" or "Sound Mixer", right-click, and select "Enable".
- Click "OK" to save your changes.
VB-Cable is a set of virtual audio devices working as virtual audio cables. Any application can send audio to the output, and any other application can pick this sound from the input. If the Windows Sound Mixer is unavailable, using VB-Cable is a reliable alternative.
- Visit the official VB-Cable download page: VB-Cable Virtual Audio Device.
- Download the VB-Cable installer.
- Extract the ZIP file.
- Right-click on the
VBCABLE_Setup_x64.exe
(for 64-bit Windows) orVBCABLE_Setup.exe
(for 32-bit Windows) and select "Run as administrator". - Proceed with the installation.
- Restart your computer after the installation is complete.
Before running the script, ensure your audio output is set correctly.
-
If using the Windows Sound Mixer:
- Set your desired application's audio output as default.
-
If using VB-Cable:
- Right-click the speaker icon in the system tray (bottom right of your screen).
- Select "Open Sound settings".
- In the "Output" section, select "CABLE Input (VB-Audio Virtual Cable)" from the dropdown menu.
When using VB-Cable as your output/input device, sound won't play through your speakers. You'll need to switch the Windows sound output back to your usual device to hear it. Thus, during recording, audio won't be audible; start and stop recording based on judgment.
- Navigate to the directory containing
sourcer.py
. - In the command line or terminal, run:
py sourcer.py
- Follow the on-screen instructions to record audio.