Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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-fork 1.0.1.dev1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aec-audio-processing-fork 1.0.1.dev1
File Size Uploaded
aec_audio_processing_fork-1.0.1.dev1.tar.gz 5.9 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for aec-audio-processing-fork 1.0.1.dev1
File Interpreter ABI Platform
aec_audio_processing_fork-1.0.1.dev1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
aec_audio_processing_fork-1.0.1.dev1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
aec_audio_processing_fork-1.0.1.dev1-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_fork-1.0.1.dev1.tar.gz

Download URL aec_audio_processing_fork-1.0.1.dev1.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
c325db5c791f32c643b97d7a81c8f4757c4cb6e19d4d70520a287ae405ad8e69
BLAKE2b-256 checksum
How to use checksums
2d79efb7d0bf80385a22d54f2acf23134594cfb8d8bb7ef4f8618690e616c89f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / aec_audio_processing_fork-1.0.1.dev1-cp313-cp313-win_amd64.whl

Download URL aec_audio_processing_fork-1.0.1.dev1-cp313-cp313-win_amd64.whl
Size 921.0 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
f6ce0843862df881815b633e9a636d58c0e5e7af22c6bffd2d9680153eeab149
BLAKE2b-256 checksum
How to use checksums
10f2cc892c25546c1ad6c02d2fd7ef82f3a008dfee59f616a30c757c9a416778
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / aec_audio_processing_fork-1.0.1.dev1-cp312-cp312-win_amd64.whl

Download URL aec_audio_processing_fork-1.0.1.dev1-cp312-cp312-win_amd64.whl
Size 921.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
a15b25f576482319d7355606f0a0f7c8a6e1e4c07f53b0c1d6d54dee0fad3625
BLAKE2b-256 checksum
How to use checksums
8de51e2a94110a9c26504227bc6e0ead6584d455a9a6de00d0e0e35d557e24da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / aec_audio_processing_fork-1.0.1.dev1-cp311-cp311-win_amd64.whl

Download URL aec_audio_processing_fork-1.0.1.dev1-cp311-cp311-win_amd64.whl
Size 920.8 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
6ac62200100d6dd02621d24e3308d2a8942cacc7e81998265f51bdf9726439e9
BLAKE2b-256 checksum
How to use checksums
1bfde1f31437a9131efdfbba8258fdc6a2ddfe2b0f5a28ec0873b6c2342532cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.0.1.dev1 This release

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page