A simple Python library for recording audio
Project description
🎙️ Audio Recorder - Python Library for Recording Audio
🚀 Introduction
Audio Recorder is a simple and lightweight Python package that allows you to record audio and save it as a WAV file.
Built using pyaudio, it provides a convenient way to capture audio with minimal setup.
🎯 Features
✅ Record audio using Python
✅ Save recordings as WAV files
✅ Adjustable recording duration and sample rate
✅ Supports different audio channels
📦 Installation
1️⃣ Install from PyPI
pip install audio-recorder
2️⃣ Install from Source (GitHub)
sh
Copy
Edit
git clone https://github.com/Keshab-Kumar/audio_recorder.git
cd audio_recorder
pip install -e .
🎤 Usage
Basic Example
python
Copy
Edit
from audio_recorder import AudioRecorder
recorder = AudioRecorder(duration=5) # Records for 5 seconds
recorder.record() # Saves the recording in the "output" folder
Custom Settings
python
Copy
Edit
recorder = AudioRecorder(duration=10, sample_rate=48000, channels=1, output_file="output/custom_audio.wav")
recorder.record()
📂 Output
All recorded files will be stored in the output/ directory.
🛠 How It Works
1️⃣ Opens an audio input stream.
2️⃣ Records audio for the given duration.
3️⃣ Saves the audio as a .wav file in the output/ folder.
🐞 Troubleshooting
If you encounter issues with pyaudio, try installing it manually:
sh
Copy
Edit
pip install pipwin
pipwin install pyaudio
📝 License
This project is licensed under the MIT License.
🔗 Links
📂 GitHub: audio_recorder
📖 PyPI (after publishing): audio_recorder
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file audio_recorder_k-0.1.0.tar.gz.
File metadata
- Download URL: audio_recorder_k-0.1.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3d7394c01655cd860ad377185cfb8d4031ceb2c4376d08fe764d13e1d489946
|
|
| MD5 |
23ee81e978aed3754a48b240a87fe9ea
|
|
| BLAKE2b-256 |
f09105453fc44a62d2a6c77a9eeda547ee477746cc37ffc5aef8e6c449e93582
|
File details
Details for the file audio_recorder_k-0.1.0-py3-none-any.whl.
File metadata
- Download URL: audio_recorder_k-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6347b477b634c2ddc5a563c5de7ac44761c60279e0d48c8ebe846145c9a96257
|
|
| MD5 |
291c5a11a679f337535994e40cab873c
|
|
| BLAKE2b-256 |
7dd0671304f3521a6ebdbd6a2d22471881d71e03810402a1f6100d6bf854f95e
|