Skip to content

Commit f6b5c42

Browse files
committed
fix flake
1 parent ff8e635 commit f6b5c42

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tools/extract_embedding.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ def single_job(utt):
2626
if sample_rate != 16000:
2727
audio = torchaudio.transforms.Resample(orig_freq=sample_rate, new_freq=16000)(audio)
2828
feat = kaldi.fbank(audio,
29-
num_mel_bins=80,
30-
dither=0,
31-
sample_frequency=16000)
29+
num_mel_bins=80,
30+
dither=0,
31+
sample_frequency=16000)
3232
feat = feat - feat.mean(dim=0, keepdim=True)
3333
embedding = ort_session.run(None, {ort_session.get_inputs()[0].name: feat.unsqueeze(dim=0).cpu().numpy()})[0].flatten().tolist()
3434
return utt, embedding

tools/extract_speech_token.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def single_job(utt):
3333
else:
3434
feat = whisper.log_mel_spectrogram(audio, n_mels=128)
3535
speech_token = ort_session.run(None, {ort_session.get_inputs()[0].name: feat.detach().cpu().numpy(),
36-
ort_session.get_inputs()[1].name: np.array([feat.shape[2]], dtype=np.int32)})[0].flatten().tolist()
36+
ort_session.get_inputs()[1].name: np.array([feat.shape[2]], dtype=np.int32)})[0].flatten().tolist()
3737
return utt, speech_token
3838

3939

0 commit comments

Comments
 (0)