babysor/MockingBird · error
Unable to import 'webrtcvad'. This package enables noise rem
Error message
Unable to import 'webrtcvad'. This package enables noise removal and is recommended.
What it means
Error "Unable to import 'webrtcvad'. This package enables noise removal and is recommended." thrown in babysor/MockingBird.
Source
Thrown at models/encoder/audio.py:13
from scipy.ndimage.morphology import binary_dilation
from models.encoder.params_data import *
from pathlib import Path
from typing import Optional, Union
from warnings import warn
import numpy as np
import librosa
import struct
try:
import webrtcvad
except:
warn("Unable to import 'webrtcvad'. This package enables noise removal and is recommended.")
webrtcvad=None
int16_max = (2 ** 15) - 1
def preprocess_wav(fpath_or_wav: Union[str, Path, np.ndarray],
source_sr: Optional[int] = None,
normalize: Optional[bool] = True,
trim_silence: Optional[bool] = True):
"""
Applies the preprocessing operations used in training the Speaker Encoder to a waveform
either on disk or in memory. The waveform will be resampled to match the data hyperparameters.
:param fpath_or_wav: either a filepath to an audio file (many extensions are supported, not
just .wav), either the waveform as a numpy array of floats.
:param source_sr: if passing an audio waveform, the sampling rate of the waveform before
preprocessing. After preprocessing, the waveform's sampling rate will match the data
hyperparameters. If passing a filepath, the sampling rate will be automatically detected and View on GitHub (pinned to 28dc5e14f1)
When it happens
Trigger: Thrown at models/encoder/audio.py:13 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of babysor/MockingBird@28dc5e14f1 (2026-08-27).
Data as JSON: /api/errors/1ff4f754325a9cbb.
Report an issue: GitHub.