Skip to content

Commit

Permalink
normalize wav
Browse files Browse the repository at this point in the history
  • Loading branch information
robin1001 committed Nov 5, 2023
1 parent 20ff95a commit 1a40f9c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wespeaker/cli/speaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def __init__(self, model_path: str, resample_rate: int = 16000):

def extract_embedding(self, audio_path: str):
pcm, sample_rate = librosa.load(audio_path, sr=self.resample_rate)
pcm = pcm * (1 << 15)
# NOTE: produce the same results as with torchaudio.compliance.kaldi
feats = logfbank(
pcm,
Expand Down

0 comments on commit 1a40f9c

Please sign in to comment.