# 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:
```bash
pip install aec-audio-processing
```
## Basic Usage
### Simple Audio Processing
```python
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
```python
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()}")
```
Raw data
{
"_id": null,
"home_page": null,
"name": "aec-audio-processing-fork",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "acoustic echo cancellation, webrtc audioprocessing, voice activity detection, noise suppression, automatic gain control",
"author": null,
"author_email": "TheDeveloper <yourappleintelligence@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/4f/34/0500e00b974bf706c1a4f4d0dcc4b3bb310f98c6575163c66d6d38171b94/aec_audio_processing_fork-1.0.0.dev1.tar.gz",
"platform": null,
"description": "# AEC Audio Processing Module\r\n\r\nA 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.\r\n\r\n## Features\r\n\r\n- **Acoustic Echo Cancellation (AEC)**: Removes echo from audio streams\r\n- **Noise Suppression (NS)**: Reduces background noise\r\n- **Automatic Gain Control (AGC)**: Automatically adjusts audio levels\r\n\r\n## Requirements\r\n+ swig\r\n+ meson\r\n+ compile toolchain\r\n+ python3\r\n\r\n## Installation\r\n\r\nYou can install the package directly from PyPI:\r\n\r\n```bash\r\npip install aec-audio-processing\r\n```\r\n\r\n## Basic Usage\r\n\r\n### Simple Audio Processing\r\n```python\r\nfrom aec_audio_processing import AudioProcessor\r\n\r\n# Initialize with all features enabled\r\nap = AudioProcessor(enable_aec=True, enable_ns=True, enable_agc=True)\r\nap.set_stream_format(16000, 1) # 16kHz mono\r\n\r\n# Process 10ms of audio data\r\naudio_10ms = b'\\0' * 160 * 2 # 10ms, 16000 sample rate, 16 bits, 1 channel\r\naudio_out = ap.process_stream(audio_10ms)\r\n\r\n# Check if voice was detected\r\nif ap.has_voice():\r\n print(\"Voice detected!\")\r\n```\r\n\r\n### Configuration Options\r\n\r\n```python\r\nfrom aec_audio_processing import AudioProcessor\r\n\r\n# Initialize with specific features\r\nap = AudioProcessor(\r\n enable_aec=True, # Echo cancellation\r\n enable_ns=True, # Noise suppression \r\n enable_agc=True, # Automatic gain control\r\n enable_vad=True # Voice activity detection\r\n)\r\n\r\n# Set audio format\r\nap.set_stream_format(\r\n sample_rate_in=16000, # Input sample rate (Hz)\r\n channel_count_in=1, # Input channels\r\n sample_rate_out=16000, # Output sample rate (Hz) \r\n channel_count_out=1 # Output channels\r\n)\r\n\r\n# Set reverse stream for echo cancellation\r\nap.set_reverse_stream_format(16000, 1)\r\n\r\n# Set stream delay for echo cancellation\r\nap.set_stream_delay(50) # 50ms delay\r\n\r\n\r\n# Check feature status\r\nprint(f\"AEC enabled: {ap.aec_enabled()}\")\r\nprint(f\"NS enabled: {ap.ns_enabled()}\")\r\nprint(f\"AGC enabled: {ap.agc_enabled()}\")\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "AEC(Acoustic Echo Cancellation) Audio Processing Module",
"version": "1.0.0.dev1",
"project_urls": null,
"split_keywords": [
"acoustic echo cancellation",
" webrtc audioprocessing",
" voice activity detection",
" noise suppression",
" automatic gain control"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b690007e7fcf76395beebb76f685f5346f3698a9452f4316b095e6fdf2cacc76",
"md5": "c49ae36107a5f35930453ea90443feb5",
"sha256": "3ffaf6da635201d408afee2b8be683ffe089c734997ed417aed1d32982b69030"
},
"downloads": -1,
"filename": "aec_audio_processing_fork-1.0.0.dev1-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "c49ae36107a5f35930453ea90443feb5",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 920955,
"upload_time": "2025-08-29T10:43:03",
"upload_time_iso_8601": "2025-08-29T10:43:03.628275Z",
"url": "https://files.pythonhosted.org/packages/b6/90/007e7fcf76395beebb76f685f5346f3698a9452f4316b095e6fdf2cacc76/aec_audio_processing_fork-1.0.0.dev1-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4f340500e00b974bf706c1a4f4d0dcc4b3bb310f98c6575163c66d6d38171b94",
"md5": "473eb25c7001104747a984943f68cde8",
"sha256": "fc368f56a6d1292e633871cfe3d38ca417da86b421769033893b39d8c70551a3"
},
"downloads": -1,
"filename": "aec_audio_processing_fork-1.0.0.dev1.tar.gz",
"has_sig": false,
"md5_digest": "473eb25c7001104747a984943f68cde8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 19795403,
"upload_time": "2025-08-29T10:54:40",
"upload_time_iso_8601": "2025-08-29T10:54:40.653121Z",
"url": "https://files.pythonhosted.org/packages/4f/34/0500e00b974bf706c1a4f4d0dcc4b3bb310f98c6575163c66d6d38171b94/aec_audio_processing_fork-1.0.0.dev1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-29 10:54:40",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "aec-audio-processing-fork"
}