From b1f08c0a203a84918bb4cd4526625dc5f6b7eac2 Mon Sep 17 00:00:00 2001 From: Lovemefan Date: Fri, 14 Jun 2024 16:51:53 +0800 Subject: [PATCH] scale value fix (#1006) --- scripts/tele-speech/test.py | 2 +- scripts/wenet/test-onnx-streaming.py | 2 +- scripts/wenet/test-onnx.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/tele-speech/test.py b/scripts/tele-speech/test.py index 71953700..b52174d1 100755 --- a/scripts/tele-speech/test.py +++ b/scripts/tele-speech/test.py @@ -80,7 +80,7 @@ def get_features(test_wav_filename): samples = librosa.resample(samples, orig_sr=sample_rate, target_sr=16000) sample_rate = 16000 - samples *= 372768 + samples *= 32768 opts = knf.MfccOptions() # See https://github.com/Tele-AI/TeleSpeech-ASR/blob/master/mfcc_hires.conf diff --git a/scripts/wenet/test-onnx-streaming.py b/scripts/wenet/test-onnx-streaming.py index 45a4b5b7..cbf27b74 100755 --- a/scripts/wenet/test-onnx-streaming.py +++ b/scripts/wenet/test-onnx-streaming.py @@ -112,7 +112,7 @@ def get_features(test_wav_filename): audio = torchaudio.functional.resample( audio, orig_freq=sample_rate, new_freq=16000 ) - audio *= 372768 + audio *= 32768 opts = knf.FbankOptions() opts.frame_opts.dither = 0 diff --git a/scripts/wenet/test-onnx.py b/scripts/wenet/test-onnx.py index 988fef4b..b9631ddb 100755 --- a/scripts/wenet/test-onnx.py +++ b/scripts/wenet/test-onnx.py @@ -52,7 +52,7 @@ def get_features(test_wav_filename): audio = torchaudio.functional.resample( audio, orig_freq=sample_rate, new_freq=16000 ) - audio *= 372768 + audio *= 32768 opts = knf.FbankOptions() opts.frame_opts.dither = 0