AEC Audio Processing Module
A Python module for real-time audio processing using WebRTC technology, optimized and maintained by TheDeveloper. This package provides an easy-to-use interface for audio processing capabilities including echo cancellation, noise suppression, and automatic gain control.
Features
- Acoustic Echo Cancellation (AEC): Removes echo from audio streams
- Noise Suppression (NS): Reduces background noise
- Automatic Gain Control (AGC): Automatically adjusts audio levels
Requirements
- swig
- meson
- compile toolchain
- python3
Installation
You can install the package directly from PyPI:
pip install aec-audio-processing
Basic Usage
Simple Audio Processing
from aec_audio_processing import AudioProcessor
# Initialize with all features enabled
ap = AudioProcessor(enable_aec=True, enable_ns=True, enable_agc=True)
ap.set_stream_format(16000, 1) # 16kHz mono
# Process 10ms of audio data
audio_10ms = b'\0' * 160 * 2 # 10ms, 16000 sample rate, 16 bits, 1 channel
audio_out = ap.process_stream(audio_10ms)
# Check if voice was detected
if ap.has_voice():
print("Voice detected!")
Configuration Options
from aec_audio_processing import AudioProcessor
# Initialize with specific features
ap = AudioProcessor(
enable_aec=True, # Echo cancellation
enable_ns=True, # Noise suppression
enable_agc=True, # Automatic gain control
enable_vad=True # Voice activity detection
)
# Set audio format
ap.set_stream_format(
sample_rate_in=16000, # Input sample rate (Hz)
channel_count_in=1, # Input channels
sample_rate_out=16000, # Output sample rate (Hz)
channel_count_out=1 # Output channels
)
# Set reverse stream for echo cancellation
ap.set_reverse_stream_format(16000, 1)
# Set stream delay for echo cancellation
ap.set_stream_delay(50) # 50ms delay
# Check feature status
print(f"AEC enabled: {ap.aec_enabled()}")
print(f"NS enabled: {ap.ns_enabled()}")
print(f"AGC enabled: {ap.agc_enabled()}")
Metadata
Release files for aec-audio-processing 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aec_audio_processing-1.0.1.tar.gz | 5.9 MB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aec_audio_processing-1.0.1-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| aec_audio_processing-1.0.1-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| aec_audio_processing-1.0.1-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
Total release size: 8.7 MB
Release files / aec_audio_processing-1.0.1.tar.gz
| Download URL | aec_audio_processing-1.0.1.tar.gz |
|---|---|
| Size | 5.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f03a3ce3f45bf15a04a8504d0f692a651180ca2d3171bd9f3de0516e5f2b8360
|
|
BLAKE2b-256 checksum How to use checksums |
9ef1d4c91eeaed6a2d91b448eb3eb17c150a505973aa7c5495d8772325918e38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / aec_audio_processing-1.0.1-cp313-cp313-win_amd64.whl
| Download URL | aec_audio_processing-1.0.1-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 920.8 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
25502a35a08a55650d926b0280199118af42e6405cda177039fa5ad04d24671e
|
|
BLAKE2b-256 checksum How to use checksums |
11b096a1bdb897a4aff9d21efa2f805a5ba2e9cba99945e855045719105a3513
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / aec_audio_processing-1.0.1-cp312-cp312-win_amd64.whl
| Download URL | aec_audio_processing-1.0.1-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 920.8 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
158946224289773ed9101aaf4acedddb8eaed442f94809ffd7fb4778e4c65f47
|
|
BLAKE2b-256 checksum How to use checksums |
364f13a1dfdde223744a65efd17e3d3f322286e4f5220b7f3d1eb54c776930f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / aec_audio_processing-1.0.1-cp311-cp311-win_amd64.whl
| Download URL | aec_audio_processing-1.0.1-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 920.6 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
89440a4edb6a2dab0e6f89cd6b8097082f028d194b0619474ef51473411840e2
|
|
BLAKE2b-256 checksum How to use checksums |
e318692ca4f7ffe305cbcde5b8b3e1f48a545a6c44b62310d307ca27aadd1957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|