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

Release files for PyAudioWPatch 0.2.12.8

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.8
File
pyaudiowpatch-0.2.12.8-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
pyaudiowpatch-0.2.12.8-cp314-cp314-win32.whl CPython 3.14 CPython 3.14 Windows x86-32 Details
pyaudiowpatch-0.2.12.8-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pyaudiowpatch-0.2.12.8-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
pyaudiowpatch-0.2.12.8-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pyaudiowpatch-0.2.12.8-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
pyaudiowpatch-0.2.12.8-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pyaudiowpatch-0.2.12.8-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
pyaudiowpatch-0.2.12.8-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pyaudiowpatch-0.2.12.8-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
pyaudiowpatch-0.2.12.8-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pyaudiowpatch-0.2.12.8-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
pyaudiowpatch-0.2.12.8-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
pyaudiowpatch-0.2.12.8-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details

Total release size:1.4 MB

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

Download URL pyaudiowpatch-0.2.12.8-cp314-cp314-win_amd64.whl
Size 101.0 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
df6e26032439d87cbbeb8f433e635652a36d54cdd14aa058188e21ba5c9a7df9
BLAKE2b-256 checksum
How to use checksums
12611c9e515e45dfd86d25a1447ac7241436c8000c3ab142011c23fb1d3202ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp314-cp314-win32.whl
Size 98.8 kB
Tags CPython 3.14 Windows x86-32
SHA-256 checksum
How to use checksums
448b83316295ab4786b1844ea296d4848c75b93ada4df6f2150715520cf985a5
BLAKE2b-256 checksum
How to use checksums
8ecfa2544222ca61b89b27beed06efc7d9f865216fd31d0da677921ef9fb3b9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp313-cp313-win_amd64.whl
Size 99.3 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
3339e6430836a021e1a83ddb915a42eec0a8f198693855a8f32a57b4b97e0202
BLAKE2b-256 checksum
How to use checksums
650faa9e6c6d331d2a027330e1275697ece6ace23c2209df8cd0f8c0e397ba1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp313-cp313-win32.whl
Size 96.8 kB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
d941c272ced5b1c6f1d054d47046ef50efcee954151c293c0102b410f549c3ab
BLAKE2b-256 checksum
How to use checksums
4bb962c83aea777521b0748f3ec6b4d0f8650af88d2a7fee03b98a6257f8ec32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp312-cp312-win_amd64.whl
Size 99.3 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
fd163a6531c4e4969925e687ef1bc57fae8ecc1a95de7ba707a436622552d7fa
BLAKE2b-256 checksum
How to use checksums
e5e1c25c239737386a3fd85354ce35a00fbe83e993a7e51d76791022850ca12c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp312-cp312-win32.whl
Size 96.8 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
5c6f54cbee50ed3c971767cc8e85f45e94012aa3c4363b7cdd8541e9f9496d01
BLAKE2b-256 checksum
How to use checksums
884eba7c938033fb25ba25f35e9f125f5c270e60c7789e65662d37424a5d9c0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp311-cp311-win_amd64.whl
Size 99.1 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
8610948499efa12b01ec861408fcc95e7bc18c1dddf0abbfed6fd2305a898f63
BLAKE2b-256 checksum
How to use checksums
55df88a94ca45c8b158b52888f5010cdad2f7998d5c4a44d0794fab97937f9ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp311-cp311-win32.whl
Size 96.6 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
13903f6a78abfd745fbae82c1edda95119fce179c6f2fc95e7849a54d537dce1
BLAKE2b-256 checksum
How to use checksums
f8a30bd930258c9b81f77ec52f1edfa5a8ed44c4d6079d1253c4fee5ed766863
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp310-cp310-win_amd64.whl
Size 99.1 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
7a2059464378213c0b83cdbea04a0ceacbdbd5ec791ffe29ed2ce490321aa604
BLAKE2b-256 checksum
How to use checksums
bc1be913831e7d7d8b5c325b2c08f00dfe93a3d6af284af64dfdcd5637e85fad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp310-cp310-win32.whl
Size 96.6 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
c5bffe533fdf37f36f58d8997f90247d46d42db2b1c4a970d9cc4637dacd322c
BLAKE2b-256 checksum
How to use checksums
b4f61ab3beaae4641a6c21f2bbc6e5d95d7dcdc9cb253a406f23669fc66d996b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp39-cp39-win_amd64.whl
Size 99.1 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
19dd0727ac54c5fc2062d3073a985099348fe8c57b7f284007c50b02f8601e57
BLAKE2b-256 checksum
How to use checksums
0cdbae56584fc1e2d37a78ace1a9c3626dd96971ab961bcc27b4a6b3885ba29d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

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

Download URL pyaudiowpatch-0.2.12.8-cp39-cp39-win32.whl
Size 96.6 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
f9f7b48b3baa088e2bc1f8e4d465ce5341b62fcd7a57023427ff1d8f7b4c1269
BLAKE2b-256 checksum
How to use checksums
084e78077b169b3bafd6f4baf656f5b36c419f616f133280a38ef60091b0b866
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.8-cp38-cp38-win_amd64.whl

Download URL pyaudiowpatch-0.2.12.8-cp38-cp38-win_amd64.whl
Size 99.0 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
0de232f72302c4a37162ab0c56f55616631b0490f213f7dbe651ba589d7d77a0
BLAKE2b-256 checksum
How to use checksums
1f7e172d828ba914d18600c5ee10a7f7a7e77f404924bc7f85f41a7b8f278462
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

Release files / pyaudiowpatch-0.2.12.8-cp38-cp38-win32.whl

Download URL pyaudiowpatch-0.2.12.8-cp38-cp38-win32.whl
Size 96.6 kB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
82617f01581a563ffab228bdf6b31a72949ce7673bf7d2716294da142012b645
BLAKE2b-256 checksum
How to use checksums
3f5c46b571648ca9dea1d954a2fab888ce2b83b28e1e832e6f31e10b71e28ddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.12.8 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