AEC(Acoustic Echo Cancellation) Audio Processing Module
Project description
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()}")
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 Distributions
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 aec_audio_processing-1.0.1.tar.gz.
File metadata
- Download URL: aec_audio_processing-1.0.1.tar.gz
- Upload date:
- Size: 5.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03a3ce3f45bf15a04a8504d0f692a651180ca2d3171bd9f3de0516e5f2b8360
|
|
| MD5 |
2e31fc1fe728e701c8312dc5f8fd5715
|
|
| BLAKE2b-256 |
9ef1d4c91eeaed6a2d91b448eb3eb17c150a505973aa7c5495d8772325918e38
|
File details
Details for the file aec_audio_processing-1.0.1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: aec_audio_processing-1.0.1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 920.8 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25502a35a08a55650d926b0280199118af42e6405cda177039fa5ad04d24671e
|
|
| MD5 |
e89cc230f14d303fa088d986e06e6b27
|
|
| BLAKE2b-256 |
11b096a1bdb897a4aff9d21efa2f805a5ba2e9cba99945e855045719105a3513
|
File details
Details for the file aec_audio_processing-1.0.1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: aec_audio_processing-1.0.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 920.8 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
158946224289773ed9101aaf4acedddb8eaed442f94809ffd7fb4778e4c65f47
|
|
| MD5 |
98c347ea2703d80a4c6b0c00afb07201
|
|
| BLAKE2b-256 |
364f13a1dfdde223744a65efd17e3d3f322286e4f5220b7f3d1eb54c776930f1
|
File details
Details for the file aec_audio_processing-1.0.1-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: aec_audio_processing-1.0.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 920.6 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89440a4edb6a2dab0e6f89cd6b8097082f028d194b0619474ef51473411840e2
|
|
| MD5 |
f7bef0355b913aca5cdac1419b43b649
|
|
| BLAKE2b-256 |
e318692ca4f7ffe305cbcde5b8b3e1f48a545a6c44b62310d307ca27aadd1957
|