{"record":{"id":"bc7f14b331243a6b","repo":"babysor/MockingBird","slug":"package-webrtcvad-not-found-this-package-enable-bc7f14","errorCode":null,"errorMessage":"Package 'webrtcvad' not found. This package enables noise removal and is recommended. Please install and try again. If installation fails, use --no_trim to disable this error message.","messagePattern":"Package 'webrtcvad' not found\\. This package enables noise removal and is recommended\\. Please install and try again\\. If installation fails, use --no_trim to disable this error message\\.","errorType":"exception","errorClass":"ModuleNotFoundError","httpStatus":null,"severity":"error","filePath":"pre.py","lineNumber":63,"sourceCode":"        \"this value on GPUs with low memory. Set it to 1 if CUDA is unhappy\")\n    parser.add_argument(\"-ee\",\"--emotion_extract\", action=\"store_true\", help=\\\n        \"Preprocess audio to extract emotional numpy (for emotional vits).\")\n    args = parser.parse_args()\n\n    # Process the arguments\n    if not hasattr(args, \"out_dir\"):\n        args.out_dir = args.datasets_root.joinpath(\"SV2TTS\", \"synthesizer\")\n    assert args.dataset in recognized_datasets, 'is not supported, please vote for it in https://github.com/babysor/MockingBird/issues/10'\n    # Create directories\n    assert args.datasets_root.exists()\n    args.out_dir.mkdir(exist_ok=True, parents=True)\n\n    # Verify webrtcvad is available\n    if not args.no_trim:\n        try:\n            import webrtcvad\n        except:\n            raise ModuleNotFoundError(\"Package 'webrtcvad' not found. This package enables \"\n                \"noise removal and is recommended. Please install and try again. If installation fails, \"\n                \"use --no_trim to disable this error message.\")\n    encoder_model_fpath = args.encoder_model_fpath\n    del args.no_trim\n   \n    args.hparams = hparams.parse(args.hparams)\n    n_processes_embed = args.n_processes_embed\n    del args.n_processes_embed\n    preprocess_dataset(**vars(args))\n    \n    create_embeddings(synthesizer_root=args.out_dir, n_processes=n_processes_embed, encoder_model_fpath=encoder_model_fpath, skip_existing=args.skip_existing)\n    \n    if args.emotion_extract:\n        create_emo(synthesizer_root=args.out_dir, n_processes=n_processes_embed, skip_existing=args.skip_existing, hparams=args.hparams)\n","sourceCodeStart":45,"sourceCodeEnd":78,"githubUrl":"https://github.com/babysor/MockingBird/blob/28dc5e14f12d7c754612af2fde8e78a4b03f8616/pre.py#L45-L78","documentation":"pre.py (SV2TTS preprocessing) uses webrtcvad for lead-in/out trimming. Unless --no_trim is passed, it imports webrtcvad and converts ImportError into ModuleNotFoundError with instructions.","triggerScenarios":"Running encoder_preprocess/pre without --no_trim on an environment where webrtcvad (which compiles C code) is not installed or failed to build.","commonSituations":"Windows without Build Tools / missing gcc; Python version without a webrtcvad wheel; fresh env after requirements prune.","solutions":["pip install webrtcvad (install a C compiler if the build fails: VS Build Tools on Windows, build-essential on Linux)","Or run preprocessing with --no_trim to skip VAD trimming","On modern Pythons try webrtcvad-wheels as a prebuilt alternative"],"exampleFix":"# before\n$ python pre.py <args>          # ModuleNotFoundError: webrtcvad\n\n# after\n$ pip install webrtcvad\n$ python pre.py <args>\n# or\n$ python pre.py --no_trim <args>","handlingStrategy":"fallback","validationCode":"try:\n    import webrtcvad  # noqa\n    HAVE_VAD = True\nexcept ImportError:\n    HAVE_VAD = False\n# pass no_trim=not HAVE_VAD downstream","typeGuard":null,"tryCatchPattern":null,"preventionTips":["pip install webrtcvad (or webrtcvad-wheels) before preprocessing","Use --no_trim when VAD trimming is optional and install fails","Pin build tools: build-essential / VS Build Tools in env setup docs"],"tags":["webrtcvad","dependency","preprocessing","install"],"backgroundTag":"missing-dependency","analyzedSha":"28dc5e14f12d7c754612af2fde8e78a4b03f8616","analyzedAt":"2026-08-27T02:26:53.589Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}