Skip to main content

❤ Recall.ai - API for desktop recording

If you’re looking for a hosted desktop recording API, consider checking out Recall.ai, an API that records Zoom, Google Meet, Microsoft Teams, in-person meetings, and more.

✨ This repo is sponsored by Recall.ai ✨

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. You can get recording from any device that supports WASAPI, for example, you can even record audio from Bluetooth headphones🎧

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! ↣ Press ⭐

Installation

pip install PyAudioWPatch

Wheels are available for Windows, Python 3.{7,8,9,10,11,12,13,14,15}.
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

Star History

Star History Chart

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.9

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

Built distributions (wheels)

Table of built distributions (wheels) for PyAudioWPatch 0.2.12.9
File
pyaudiowpatch-0.2.12.9-cp315-cp315-win_amd64.whl CPython 3.15 CPython 3.15 Windows x86-64 Details
pyaudiowpatch-0.2.12.9-cp315-cp315-win32.whl CPython 3.15 CPython 3.15 Windows x86-32 Details
pyaudiowpatch-0.2.12.9-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
pyaudiowpatch-0.2.12.9-cp314-cp314-win32.whl CPython 3.14 CPython 3.14 Windows x86-32 Details
pyaudiowpatch-0.2.12.9-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pyaudiowpatch-0.2.12.9-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
pyaudiowpatch-0.2.12.9-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pyaudiowpatch-0.2.12.9-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
pyaudiowpatch-0.2.12.9-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pyaudiowpatch-0.2.12.9-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
pyaudiowpatch-0.2.12.9-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pyaudiowpatch-0.2.12.9-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
pyaudiowpatch-0.2.12.9-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pyaudiowpatch-0.2.12.9-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details

Total release size: 1.4 MB

Release files / pyaudiowpatch-0.2.12.9-cp315-cp315-win_amd64.whl

Download URL pyaudiowpatch-0.2.12.9-cp315-cp315-win_amd64.whl
Size 101.6 kB
Tags CPython 3.15 Windows x86-64
SHA-256 checksum
How to use checksums
81d51b5b88c9e2124c33d0f9f22bf51392b93a4328f34e135e861e0c2c953c7f
BLAKE2b-256 checksum
How to use checksums
069e583c053cc5580b07a2a3ff4511bce40be32167c56b948893b728b5260d31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp315-cp315-win32.whl

Download URL pyaudiowpatch-0.2.12.9-cp315-cp315-win32.whl
Size 99.8 kB
Tags CPython 3.15 Windows x86-32
SHA-256 checksum
How to use checksums
f76cdf7dd0a9deb74e95f0e9f04c2af0898eb055e1d3572bed0eb75a37de03dd
BLAKE2b-256 checksum
How to use checksums
948efe6a70dac52966fe54d34aea4373deb8ac3226e27b96641a78bf0d716ae7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp314-cp314-win_amd64.whl

Download URL pyaudiowpatch-0.2.12.9-cp314-cp314-win_amd64.whl
Size 101.6 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
dc3ae964530ffe70119a1e2f5b76c661b676aa1cf1b9755d8ecafe081ee85f53
BLAKE2b-256 checksum
How to use checksums
874ece82cdfdcc37eadb7f405f278182d6b8bb8f6a7d177c83537ddfd53aee24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp314-cp314-win32.whl

Download URL pyaudiowpatch-0.2.12.9-cp314-cp314-win32.whl
Size 99.8 kB
Tags CPython 3.14 Windows x86-32
SHA-256 checksum
How to use checksums
85b011276c882c6d302425a0a5d6bb3f00be45ef80a6c362d04b8d7234f5f5de
BLAKE2b-256 checksum
How to use checksums
e75cc45444bc928b6c40e2c36af9f2f721bb7ad3057debffe50f34e4081ab5d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp313-cp313-win_amd64.whl

Download URL pyaudiowpatch-0.2.12.9-cp313-cp313-win_amd64.whl
Size 100.1 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
aaa847f5f76e11b42242b51293d872f811ab8925146c34ca79f21c9b18bda551
BLAKE2b-256 checksum
How to use checksums
89d72cf4d426d823e0931dd8830ed0751570997fba92d2596b25c22bd842b1da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp313-cp313-win32.whl

Download URL pyaudiowpatch-0.2.12.9-cp313-cp313-win32.whl
Size 97.8 kB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
f747213885420a6b46f5d4d8dd0b441c14591893e3fcc740d2f0961bb16c2b4c
BLAKE2b-256 checksum
How to use checksums
ca02542a39af9f7ee589d039ed41714539ff7db08541256deaf0c04f64c5a213
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp312-cp312-win_amd64.whl

Download URL pyaudiowpatch-0.2.12.9-cp312-cp312-win_amd64.whl
Size 100.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
963376e94f46c84e994eda4d25ffd62b712881ad5d611a4f4433bb5aa0bf7fa4
BLAKE2b-256 checksum
How to use checksums
4f4ab3040ab051c3d2ee6b123e67db7a3e980fbf8e71f9d3b822366e8b380eb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp312-cp312-win32.whl

Download URL pyaudiowpatch-0.2.12.9-cp312-cp312-win32.whl
Size 97.9 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
ac7d187b2c470bc5c76cbc9e30c8127564fc3a653fcae9c820d6b3ddf417b6e4
BLAKE2b-256 checksum
How to use checksums
faa3acb33103ec3bf1be0255bf423791d3ffcb4c194a1d2b66aaceb311bc8269
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp311-cp311-win_amd64.whl

Download URL pyaudiowpatch-0.2.12.9-cp311-cp311-win_amd64.whl
Size 99.9 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
46aacc940069157b80d5ba07159f2d86c3a560ae8c1878091802f8b223377f7a
BLAKE2b-256 checksum
How to use checksums
4772a4e7496e70bbf1c279ac571654654789a7f752a6600ee07dedb1cca69768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp311-cp311-win32.whl

Download URL pyaudiowpatch-0.2.12.9-cp311-cp311-win32.whl
Size 97.7 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
0cf14a1945e53ab64e2f3d89a899563c5af02a0869a4d17ea0c6f27f321788d6
BLAKE2b-256 checksum
How to use checksums
c67b6b42798a26042c0c904207d759d871fd4b168a45a107465508aad90a9ffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp310-cp310-win_amd64.whl

Download URL pyaudiowpatch-0.2.12.9-cp310-cp310-win_amd64.whl
Size 99.9 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
79e0059085fad1713bf5d728a9d2cb2fbd6c5b2a3fd13d74ca2a1e5056d69d69
BLAKE2b-256 checksum
How to use checksums
6d5f76d3558d65bc815c889dc97171d1f2b15bae4d984b36517baa30d97a14b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp310-cp310-win32.whl

Download URL pyaudiowpatch-0.2.12.9-cp310-cp310-win32.whl
Size 97.7 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
3b6248a479e02f839a110240a56edf3f3605a396ce84a4ef2ca95175baebf645
BLAKE2b-256 checksum
How to use checksums
749607cbc0388e67b8f8dee260f3cfc1424c16f546f41d14ec7f6f1c86288096
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp39-cp39-win_amd64.whl

Download URL pyaudiowpatch-0.2.12.9-cp39-cp39-win_amd64.whl
Size 99.9 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
0dc16c449c588d7654a46761ff01648a7965cf60b63ead6669be05447b8e3bc5
BLAKE2b-256 checksum
How to use checksums
cfab208c45705a59a760aeeb1a6101c716bf187a84e4a6c397e5faa24970e600
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.9-cp39-cp39-win32.whl

Download URL pyaudiowpatch-0.2.12.9-cp39-cp39-win32.whl
Size 97.7 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
c35572203c560dc1e483bd180b5ed0c70f00313c2945ff366a855b499e7b644a
BLAKE2b-256 checksum
How to use checksums
f7417ad44fe166cc472f0f85c849021b68d8d4cc0f1d759d184bc2f75e254756
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.12.9 This release

14 release files

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