Skip to main content

PvRecorder Binding for Python

PvRecorder

PvRecorder is an easy-to-use, cross-platform audio recorder designed for real-time speech audio processing. It allows developers access to an audio device's input stream, broken up into data frames of a given size.

Compatibility

  • Python 3.9+
  • Runs on Linux (x86_64), macOS (x86_64 and arm64), Windows (x86_64 and arm64), and Raspberry Pi (Zero, 3, 4, 5).

Installation

pip3 install pvrecorder

Usage

Initialize and begin recording:

from pvrecorder import PvRecorder

recorder = PvRecorder(frame_length=512)
recorder.start()

(or)

Use get_available_devices() to get a list of available devices and then initialize the instance based on the index of a device:

from pvrecorder import PvRecorder

devices = PvRecorder.get_available_devices()

recorder = PvRecorder(frame_length=512, device_index=0)
recorder.start()

Read frames of audio:

while recorder.is_recording:
    frame = recorder.read()
    # process audio frame

To stop recording, call stop() on the instance:

recorder.stop()

Once you are done, free the resources acquired by PvRecorder. You do not have to call stop() before delete():

recorder.delete()

Demos

pvrecorderdemo provides command-line utilities for recording audio to a file.

Metadata

Release files for pvrecorder 1.2.7

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

Source distribution (sdist)

Source distribution for pvrecorder 1.2.7
File Size Uploaded Provenance Actions
pvrecorder-1.2.7.tar.gz 4.1 MB Without provenance Details for pvrecorder-1.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pvrecorder 1.2.7
File Interpreter ABI Platform Actions
pvrecorder-1.2.7-py3-none-any.whl Python 3 none any Details for pvrecorder-1.2.7-py3-none-any.whl

Total release size: 8.3 MB

Release files / pvrecorder-1.2.7.tar.gz

Download URL pvrecorder-1.2.7.tar.gz
Size 4.1 MB
Tags Source
SHA-256 checksum
How to use checksums
f60b2174bff317c4349a916f59b5e71914a120f8313a9458f9ee25b89a800c75
BLAKE2b-256 checksum
How to use checksums
7b93972f2500bca8e2b7807f2c6232504df4f1b82db546e42fdd2de109b98032
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / pvrecorder-1.2.7-py3-none-any.whl

Download URL pvrecorder-1.2.7-py3-none-any.whl
Size 4.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
72c44be78069be92a602b0dfad42fbdc62b536f47c151e62076ee49ba877dfb0
BLAKE2b-256 checksum
How to use checksums
f64cb1706065a9b52efa9a23e3822076b8916de2ff26036b6ff1474d90f95c95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Security for pvrecorder 1.2.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.

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