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 hashes)

Uploaded Python 3

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