Skip to main content
Release files added late

2 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.

PyAudio Wasapi Loopback Patch

PyAudioWPatch

This fork will allow you to use the WASAPI device as loopback using PyAudio.
So you can use speakers to record audioвњЁ

Last Commit Wheels Downloads Py Version Latest release



For whom?

If you want to record sound from speakers in python, then this fork is for you.

PyAudioW(indows|ASAPI)Patch come only with WMME, DirectX and WASAPI support if you need more -> create an issue

How

The Windows Audio Session API (WASAPI) allows you to use output devices (that support this API) in loopback mode. At the time of release, it was impossible to achieve this using the original version of PyAudio.

Note: Now WASAPI loopback devices are duplicated at the end of the list as virtual devices. That is, to record from speakers, you need to use not just a WASAPI device, but its loopback analogue. All loopback devices are input devices.

How to use

Read -> Install -> Enjoy!

Installation

pip install PyAudioWPatch

Wheels are available for Windows, Python 3.{7,8,9,10,11}.
All wheels support APIs: WMME, WASAPI, DirectX(DSound).

In code

With new features:

import pyaudiowpatch as pyaudio

with pyaudio.PyAudio() as p:
    # Open PyA manager via context manager
    with p.open(...) as stream:
        # Open audio stream via context manager
        # Do some stuff
        ...

Or in original PyAudio way:

import pyaudiowpatch as pyaudio

p = pyaudio.PyAudio()
stream = p.open(...)

# Do some stuff
...

stream.stop_stream()
stream.close()

# close PyAudio
p.terminate()

Difference with PyAudio

  • The behavior of all standard methods is unchanged
  • Added several life-improving methods
  • Fixed problem with name encoding
  • Ability to record audio from WASAPI loopback devices (see example)

More detailed

Examples:

Sources

The following were taken as a basis:

How to build manually

  • Build PortAudio (using the instructions in the README)
  • Install python
  • run in the PyAudioWPatch directory:
    python setup.py install
    
  • ???
  • Profit.

Also you can build wheels:

  • pip install cibuildwheel
  • Run in Cygwin:
    ./cygwin_cibuildwheel_build.sh
    
  • Get your wheels in the ./wheelhouse folder

Origin README

PyAudio

PyAudio provides Python bindings for PortAudio v19, the cross-platform audio I/O library. With PyAudio, you can easily use Python to play and record audio on a variety of platforms, such as GNU/Linux, Microsoft Windows, and Apple macOS.

PyAudio is distributed under the MIT License.

Installation

See the INSTALLATION file in the source distribution for details. In summary, install PyAudio using pip on most platforms.

Windows

python -m pip install pyaudio

This installs the precompiled PyAudio library with PortAudio v19 19.7.0 included. The library is compiled with support for Windows MME API, DirectSound, WASAPI, and WDM-KS. It does not include support for ASIO. If you require support for APIs not included, you will need to compile PortAudio and PyAudio.

macOS

Use Homebrew to install the prerequisite portaudio library, then install PyAudio using pip:

brew install portaudio
pip install pyaudio

GNU/Linux

Use the package manager to install PyAudio. For example, on Debian-based systems:

sudo apt install python3-pyaudio

Alternatively, if the latest version of PyAudio is not available, install it using pip. Be sure to first install development libraries for portaudio19 and python3.

Building from source

See the INSTALLATION file.

Documentation & Usage Examples

License

PyAudio is distributed under the MIT License. See LICENSE.txt.

Metadata

Release files for PyAudioWPatch 0.2.12.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Files added late

2 files were uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Built distributions (wheels)

Table of built distributions (wheels) for PyAudioWPatch 0.2.12.6
File Actions
PyAudioWPatch-0.2.12.6-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for PyAudioWPatch-0.2.12.6-cp312-cp312-win_amd64.whl
PyAudioWPatch-0.2.12.6-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details for PyAudioWPatch-0.2.12.6-cp312-cp312-win32.whl
PyAudioWPatch-0.2.12.6-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for PyAudioWPatch-0.2.12.6-cp311-cp311-win_amd64.whl
PyAudioWPatch-0.2.12.6-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details for PyAudioWPatch-0.2.12.6-cp311-cp311-win32.whl
PyAudioWPatch-0.2.12.6-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for PyAudioWPatch-0.2.12.6-cp310-cp310-win_amd64.whl
PyAudioWPatch-0.2.12.6-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details for PyAudioWPatch-0.2.12.6-cp310-cp310-win32.whl
PyAudioWPatch-0.2.12.6-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for PyAudioWPatch-0.2.12.6-cp39-cp39-win_amd64.whl
PyAudioWPatch-0.2.12.6-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details for PyAudioWPatch-0.2.12.6-cp39-cp39-win32.whl
PyAudioWPatch-0.2.12.6-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for PyAudioWPatch-0.2.12.6-cp38-cp38-win_amd64.whl
PyAudioWPatch-0.2.12.6-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details for PyAudioWPatch-0.2.12.6-cp38-cp38-win32.whl
PyAudioWPatch-0.2.12.6-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for PyAudioWPatch-0.2.12.6-cp37-cp37m-win_amd64.whl
PyAudioWPatch-0.2.12.6-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details for PyAudioWPatch-0.2.12.6-cp37-cp37m-win32.whl

Total release size: 1.0 MB

Release files / PyAudioWPatch-0.2.12.6-cp312-cp312-win_amd64.whl

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL PyAudioWPatch-0.2.12.6-cp312-cp312-win_amd64.whl
Size 86.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
b5d3395aa9ab6ce59be7e18df84be9b749725b606317cd9290496082fac8256d
BLAKE2b-256 checksum
How to use checksums
a2d64fb6a716f3d33002cc5992ce299fb3c3415172b120c65fc8fd8d905b413c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp312-cp312-win32.whl

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL PyAudioWPatch-0.2.12.6-cp312-cp312-win32.whl
Size 84.2 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
6121c247f2c4417cbbcbe9cbb419b8883370d2b9951f798cf1031a55495b97a0
BLAKE2b-256 checksum
How to use checksums
193e6e0a77677247754ef0c20ee0da8dd579dc4e7f6e5e029496dd0c66d82f86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp311-cp311-win_amd64.whl

Download URL PyAudioWPatch-0.2.12.6-cp311-cp311-win_amd64.whl
Size 86.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
ff9642f32d6cc9fb183c88f36a9a34d8a7f0434dd96022ec7d235732c07c2188
BLAKE2b-256 checksum
How to use checksums
ffc4cfa2066e9cd1938468c609a75ed32784bc30aac25c50b10d891e96d46989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp311-cp311-win32.whl

Download URL PyAudioWPatch-0.2.12.6-cp311-cp311-win32.whl
Size 84.1 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
5ae26f1f7d6b76f9a6d124daef4922b12572b4f393fbe99637ea89cb03e390d8
BLAKE2b-256 checksum
How to use checksums
7b75a8cdeb8da773260e03566441ea3ee58a4077dd9fd8e022099ccdfa39e5b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp310-cp310-win_amd64.whl

Download URL PyAudioWPatch-0.2.12.6-cp310-cp310-win_amd64.whl
Size 86.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
962fe6f210aa1e1d62d8ac5f433ee7095603989f614754c819995f2328150b51
BLAKE2b-256 checksum
How to use checksums
9299cd5c957cda1e85b8be27f94409712b311e9085eb49e026b3fb6de930decb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp310-cp310-win32.whl

Download URL PyAudioWPatch-0.2.12.6-cp310-cp310-win32.whl
Size 84.0 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
3eac00d775820ee9f2f07f91965c93eb6b06864356ae197489be632add13d5e8
BLAKE2b-256 checksum
How to use checksums
b9c39e156a4353fb7706e656da2f1a605820ef791b1e0e08becb1e62d008d5f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp39-cp39-win_amd64.whl

Download URL PyAudioWPatch-0.2.12.6-cp39-cp39-win_amd64.whl
Size 86.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
c8d803a08ddab5e97b25df4e506b955d97a067bbccdff13f5b70115ddeeb0e5d
BLAKE2b-256 checksum
How to use checksums
27bd370ae7a9ee6100afed45e50e8f7ecc204617f47b379b95216a40eee30282
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp39-cp39-win32.whl

Download URL PyAudioWPatch-0.2.12.6-cp39-cp39-win32.whl
Size 84.0 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
d80712f502e0709fee3c93b568ed69343b6a2ba5b0e2e9c72d7ca19a91c1c87a
BLAKE2b-256 checksum
How to use checksums
66ab441537e5a2b5cc71f862658547e90be736d17e120dbc146ff539dd92dd1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp38-cp38-win_amd64.whl

Download URL PyAudioWPatch-0.2.12.6-cp38-cp38-win_amd64.whl
Size 86.3 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
bfcd7708c84fc7d0bbb29f27235369d3f547459f124b088a5f7281e72cd2daeb
BLAKE2b-256 checksum
How to use checksums
051fbcae8b8e98b6872ce71e08d4aa6712dd57bb3bd70198441f9d56ccaa9658
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp38-cp38-win32.whl

Download URL PyAudioWPatch-0.2.12.6-cp38-cp38-win32.whl
Size 84.0 kB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
3142092a8be291879d8fb3f99871bbe19225f30894b27721c804eec401e3dbfa
BLAKE2b-256 checksum
How to use checksums
0c3f4e0919149216cabcb9c3b7baf39d7aa2d7d55b550fdf6adfff0ede5c527f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp37-cp37m-win_amd64.whl

Download URL PyAudioWPatch-0.2.12.6-cp37-cp37m-win_amd64.whl
Size 86.3 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
e3014ff6c35e844b4977b0c201b74f69ad7319cdf2fc17b7658c8017bca0414e
BLAKE2b-256 checksum
How to use checksums
0f609f76683875689db588df0bd90c0a02b4548c4a6de37d82c1497f3c0f0282
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Release files / PyAudioWPatch-0.2.12.6-cp37-cp37m-win32.whl

Download URL PyAudioWPatch-0.2.12.6-cp37-cp37m-win32.whl
Size 84.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
42bd9bb177575d2c4cf039513be48254694d670841029e0a7c70d8949025e802
BLAKE2b-256 checksum
How to use checksums
b3afeba2e7b650e0b1feebf514ce24fd0af45d3b3cc4ea1a5bc6d3e83b77b557
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.0

Security for PyAudioWPatch 0.2.12.6

Upload timing

Release files added late

2 files were uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.


Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page