{"id":16055001,"url":"https://github.com/xiongyihui/speexdsp-python","last_synced_at":"2026-02-28T03:37:00.781Z","repository":{"id":50324318,"uuid":"88973739","full_name":"xiongyihui/speexdsp-python","owner":"xiongyihui","description":"Speex Echo Canceller Python Library","archived":false,"fork":false,"pushed_at":"2018-07-17T05:55:48.000Z","size":12,"stargazers_count":123,"open_issues_count":4,"forks_count":35,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-27T00:53:40.054Z","etag":null,"topics":["aec","echo-cancellation","python","speex"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xiongyihui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-21T10:42:05.000Z","updated_at":"2025-10-07T08:57:49.000Z","dependencies_parsed_at":"2022-08-29T04:31:29.771Z","dependency_job_id":null,"html_url":"https://github.com/xiongyihui/speexdsp-python","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/xiongyihui/speexdsp-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fspeexdsp-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fspeexdsp-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fspeexdsp-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fspeexdsp-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiongyihui","download_url":"https://codeload.github.com/xiongyihui/speexdsp-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiongyihui%2Fspeexdsp-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29924146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aec","echo-cancellation","python","speex"],"created_at":"2024-10-09T02:05:13.557Z","updated_at":"2026-02-28T03:37:00.765Z","avatar_url":"https://github.com/xiongyihui.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"speexdsp for python\n===================\n\n[![Build Status](https://travis-ci.org/xiongyihui/speexdsp-python.svg?branch=master)](https://travis-ci.org/xiongyihui/speexdsp-python)\n\n## Requirements\n+ swig\n+ compile toolchain\n+ python\n+ libspeexdsp-dev\n\n## Build\nThere are two ways to build the package.\n\n1. using setup.py\n\n    ```\n    sudo apt install libspeexdsp-dev\n    git clone https://github.com/xiongyihui/speexdsp-python.git\n    cd speexdsp-python\n    python setup.py install\n    ```\n\n2. using Makefile\n\n    ```\n    git clone https://github.com/xiongyihui/speexdsp-python.git\n    cd speexdsp-python/src\n    make\n    ```\n\n## Get started\n```python\n\"\"\"Acoustic Echo Cancellation for wav files.\"\"\"\n\nimport wave\nimport sys\nfrom speexdsp import EchoCanceller\n\n\nif len(sys.argv) \u003c 4:\n    print('Usage: {} near.wav far.wav out.wav'.format(sys.argv[0]))\n    sys.exit(1)\n\n\nframe_size = 256\n\nnear = wave.open(sys.argv[1], 'rb')\nfar = wave.open(sys.argv[2], 'rb')\n\nif near.getnchannels() \u003e 1 or far.getnchannels() \u003e 1:\n    print('Only support mono channel')\n    sys.exit(2)\n\nout = wave.open(sys.argv[3], 'wb')\nout.setnchannels(near.getnchannels())\nout.setsampwidth(near.getsampwidth())\nout.setframerate(near.getframerate())\n\n\nprint('near - rate: {}, channels: {}, length: {}'.format(\n        near.getframerate(),\n        near.getnchannels(),\n        near.getnframes() / near.getframerate()))\nprint('far - rate: {}, channels: {}'.format(far.getframerate(), far.getnchannels()))\n\n\n\necho_canceller = EchoCanceller.create(frame_size, 2048, near.getframerate())\n\nin_data_len = frame_size\nin_data_bytes = frame_size * 2\nout_data_len = frame_size\nout_data_bytes = frame_size * 2\n\nwhile True:\n    in_data = near.readframes(in_data_len)\n    out_data = far.readframes(out_data_len)\n    if len(in_data) != in_data_bytes or len(out_data) != out_data_bytes:\n        break\n\n    in_data = echo_canceller.process(in_data, out_data)\n\n    out.writeframes(in_data)\n\nnear.close()\nfar.close()\nout.close()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiongyihui%2Fspeexdsp-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiongyihui%2Fspeexdsp-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiongyihui%2Fspeexdsp-python/lists"}