{"id":13430318,"url":"https://github.com/wiseman/py-webrtcvad","last_synced_at":"2025-05-13T17:13:48.570Z","repository":{"id":40652085,"uuid":"56901410","full_name":"wiseman/py-webrtcvad","owner":"wiseman","description":"Python interface to the WebRTC Voice Activity Detector ","archived":false,"fork":false,"pushed_at":"2024-07-04T02:23:24.000Z","size":250,"stargazers_count":2230,"open_issues_count":46,"forks_count":417,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-05-13T02:38:47.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiseman.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-04-23T05:03:52.000Z","updated_at":"2025-05-12T19:26:24.000Z","dependencies_parsed_at":"2025-04-10T17:08:16.728Z","dependency_job_id":null,"html_url":"https://github.com/wiseman/py-webrtcvad","commit_stats":{"total_commits":71,"total_committers":8,"mean_commits":8.875,"dds":"0.14084507042253525","last_synced_commit":"e283ca41df3a84b0e87fb1f5cb9b21580a286b09"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiseman%2Fpy-webrtcvad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiseman%2Fpy-webrtcvad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiseman%2Fpy-webrtcvad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiseman%2Fpy-webrtcvad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiseman","download_url":"https://codeload.github.com/wiseman/py-webrtcvad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990498,"owners_count":21995776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-31T02:00:52.167Z","updated_at":"2025-05-13T17:13:43.555Z","avatar_url":"https://github.com/wiseman.png","language":"C","funding_links":[],"categories":["C","Uncategorized","Speech Enhancement \u0026 Audio Processing","VAD (Voice Activity Detection) | 语音活动检测","Audio Related Packages","6. Voice activity detection and turn-taking"],"sub_categories":["Uncategorized","Voice Activity Detection (VAD)","Core VAD Models | 核心 VAD 模型","Voice-specific prompting and tools"],"readme":".. image:: https://travis-ci.org/wiseman/py-webrtcvad.svg?branch=master\n    :target: https://travis-ci.org/wiseman/py-webrtcvad\n\npy-webrtcvad\n============\n\nThis is a python interface to the WebRTC Voice Activity Detector\n(VAD).  It is compatible with Python 2 and Python 3.\n\nA `VAD \u003chttps://en.wikipedia.org/wiki/Voice_activity_detection\u003e`_\nclassifies a piece of audio data as being voiced or unvoiced. It can\nbe useful for telephony and speech recognition.\n\nThe VAD that Google developed for the `WebRTC \u003chttps://webrtc.org/\u003e`_\nproject is reportedly one of the best available, being fast, modern\nand free.\n\nHow to use it\n-------------\n\n0. Install the webrtcvad module::\n\n    pip install webrtcvad\n\n1. Create a ``Vad`` object::\n\n    import webrtcvad\n    vad = webrtcvad.Vad()\n\n2. Optionally, set its aggressiveness mode, which is an integer\n   between 0 and 3. 0 is the least aggressive about filtering out\n   non-speech, 3 is the most aggressive. (You can also set the mode\n   when you create the VAD, e.g. ``vad = webrtcvad.Vad(3)``)::\n\n    vad.set_mode(1)\n\n3. Give it a short segment (\"frame\") of audio. The WebRTC VAD only\n   accepts 16-bit mono PCM audio, sampled at 8000, 16000, 32000 or 48000 Hz.\n   A frame must be either 10, 20, or 30 ms in duration::\n\n    # Run the VAD on 10 ms of silence. The result should be False.\n    sample_rate = 16000\n    frame_duration = 10  # ms\n    frame = b'\\x00\\x00' * int(sample_rate * frame_duration / 1000)\n    print 'Contains speech: %s' % (vad.is_speech(frame, sample_rate)\n\n\nSee `example.py\n\u003chttps://github.com/wiseman/py-webrtcvad/blob/master/example.py\u003e`_ for\na more detailed example that will process a .wav file, find the voiced\nsegments, and write each one as a separate .wav.\n\n\nHow to run unit tests\n---------------------\n\nTo run unit tests::\n\n    pip install -e \".[dev]\"\n    python setup.py test\n\n\nHistory\n-------\n\n2.0.10\n\n    Fixed memory leak. Thank you, `bond005\n    \u003chttps://github.com/bond005\u003e`_!\n\n2.0.9\n\n    Improved example code. Added WebRTC license.\n\n2.0.8\n\n    Fixed Windows compilation errors. Thank you, `xiongyihui\n    \u003chttps://github.com/xiongyihui\u003e`_!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiseman%2Fpy-webrtcvad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiseman%2Fpy-webrtcvad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiseman%2Fpy-webrtcvad/lists"}