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.
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)
| File | Size | Uploaded | |
|---|---|---|---|
| pvrecorder-1.2.7.tar.gz | 4.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pvrecorder-1.2.7-py3-none-any.whl | Python 3 | none | any | Details |
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
|