Skip to main content

A Python wrapper for paplay and parecord to play and record audio using PulseAudio.

Project description

pAudio

pAudio is a Python wrapper for paplay and parecord, the PulseAudio command-line tool for playing and capturing audio data. This module allows you to use parecord directly from Python by passing options as function arguments.

Installation

You can install the package via pip:

pip install paudio

Example Usage

from pAudio import parecord

# Example of recording with specific options
output_file = "output.wav"
parecord(
    output_file=output_file,
    record=True,
    verbose=True,
    device="@DEFAULT_SOURCE@",
    rate=48000,  # Sample rate in Hz
    channels=1,  # Mono audio
    volume=32000,  # Mid-range volume
    raw=True  # Recording raw PCM data
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

paudio-0.3.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file paudio-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: paudio-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for paudio-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3ca64a89fcfff7d2f01e83f6d2fecff45dfda1c89b6d24e7cd1169fd6fd0bb2
MD5 e0a83c229fe874155b125207b912fd3a
BLAKE2b-256 fd14b89dd1d6297f84796dd13b2bc5b0c565896827eb209f49db5a5ec3762aa8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page