All Projects → xiongyihui → speexdsp-python

xiongyihui / speexdsp-python

Licence: other
Speex Echo Canceller Python Library

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to speexdsp-python

Realtime AudioDenoise EchoCancellation
No description or website provided.
Stars: ✭ 91 (+3.41%)
Mutual labels:  speex, aec
android-webrtc-aecm
An acoustic echo cancellation for android, based on webrtc aecm algorithms
Stars: ✭ 24 (-72.73%)
Mutual labels:  echo-cancellation, aec
vim-webgl-viewer
An easy to use online 3D model viewer based on Three.JS.
Stars: ✭ 41 (-53.41%)
Mutual labels:  aec
Mobile Ffmpeg
FFmpeg for Android, iOS and tvOS. Not maintained anymore. Superseded by FFmpegKit.
Stars: ✭ 3,204 (+3540.91%)
Mutual labels:  speex
java-stream-player
🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )
Stars: ✭ 112 (+27.27%)
Mutual labels:  speex
superfast
⚡ SuperFast codecs for fre:ac
Stars: ✭ 59 (-32.95%)
Mutual labels:  speex
EasyRTC
EasyRTC视频会议系统一款强大的实时音视频通话产品,支持语音会议、视频会议、会议录像、会议回放、旁路直播、会议管理控制、文档共享、视频共享等功能,是一款广泛应用于在线教育、互动课堂、视频会议、应急指挥的即时通信平台。
Stars: ✭ 145 (+64.77%)
Mutual labels:  echo-cancellation
gh-web-ui
Package for building web-based User Interfaces (UI) in Rhino Grasshopper.
Stars: ✭ 69 (-21.59%)
Mutual labels:  aec
speckle-server
The Speckle Server, Frontend, 3D Viewer, & other JS utilities.
Stars: ✭ 224 (+154.55%)
Mutual labels:  aec
gbXML Schemas
Includes current and previous versions of the Green Building XML (gbXML) schema
Stars: ✭ 22 (-75%)
Mutual labels:  aec
AEC
Acoustic Echo Cancellation with LMS/RLS (基于LMS/RLS的自适应回声抵消)
Stars: ✭ 69 (-21.59%)
Mutual labels:  aec
compas fab
Robotic fabrication package for the COMPAS Framework.
Stars: ✭ 75 (-14.77%)
Mutual labels:  aec
speckle-qgis
QGIS Connector for Speckle 2.0
Stars: ✭ 17 (-80.68%)
Mutual labels:  aec
speckle-unity
AEC Interoperability for Unity through Speckle
Stars: ✭ 28 (-68.18%)
Mutual labels:  aec
imagecodecs
Image transformation, compression, and decompression codecs. Forked from https://pypi.org/project/imagecodecs
Stars: ✭ 56 (-36.36%)
Mutual labels:  aec
speckle-sharp
.NET SDK, Schema and Connectors: Revit, Rhino, Grasshopper, Dynamo, ETABS, AutoCAD, Civil3D & more.
Stars: ✭ 214 (+143.18%)
Mutual labels:  aec
speckle-blender
speckle.systems/tag/blender/
Stars: ✭ 38 (-56.82%)
Mutual labels:  aec

speexdsp for python

Build Status

Requirements

  • swig
  • compile toolchain
  • python
  • libspeexdsp-dev

Build

There are two ways to build the package.

  1. using setup.py

    sudo apt install libspeexdsp-dev
    git clone https://github.com/xiongyihui/speexdsp-python.git
    cd speexdsp-python
    python setup.py install
    
  2. using Makefile

    git clone https://github.com/xiongyihui/speexdsp-python.git
    cd speexdsp-python/src
    make
    

Get started

"""Acoustic Echo Cancellation for wav files."""

import wave
import sys
from speexdsp import EchoCanceller


if len(sys.argv) < 4:
    print('Usage: {} near.wav far.wav out.wav'.format(sys.argv[0]))
    sys.exit(1)


frame_size = 256

near = wave.open(sys.argv[1], 'rb')
far = wave.open(sys.argv[2], 'rb')

if near.getnchannels() > 1 or far.getnchannels() > 1:
    print('Only support mono channel')
    sys.exit(2)

out = wave.open(sys.argv[3], 'wb')
out.setnchannels(near.getnchannels())
out.setsampwidth(near.getsampwidth())
out.setframerate(near.getframerate())


print('near - rate: {}, channels: {}, length: {}'.format(
        near.getframerate(),
        near.getnchannels(),
        near.getnframes() / near.getframerate()))
print('far - rate: {}, channels: {}'.format(far.getframerate(), far.getnchannels()))



echo_canceller = EchoCanceller.create(frame_size, 2048, near.getframerate())

in_data_len = frame_size
in_data_bytes = frame_size * 2
out_data_len = frame_size
out_data_bytes = frame_size * 2

while True:
    in_data = near.readframes(in_data_len)
    out_data = far.readframes(out_data_len)
    if len(in_data) != in_data_bytes or len(out_data) != out_data_bytes:
        break

    in_data = echo_canceller.process(in_data, out_data)

    out.writeframes(in_data)

near.close()
far.close()
out.close()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].