From 2779602177ae5374547c7a7e17de0b11a166326d Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 29 四月 2024 15:08:46 +0800
Subject: [PATCH] Merge branch 'dev_gzf_exp' of github.com:alibaba-damo-academy/FunASR into dev_gzf_exp merge

---
 funasr/models/sense_voice/whisper_lib/audio.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/funasr/models/sense_voice/whisper_lib/audio.py b/funasr/models/sense_voice/whisper_lib/audio.py
index 52da32c..2f688e9 100644
--- a/funasr/models/sense_voice/whisper_lib/audio.py
+++ b/funasr/models/sense_voice/whisper_lib/audio.py
@@ -68,9 +68,7 @@
     """
     if torch.is_tensor(array):
         if array.shape[axis] > length:
-            array = array.index_select(
-                dim=axis, index=torch.arange(length, device=array.device)
-            )
+            array = array.index_select(dim=axis, index=torch.arange(length, device=array.device))
 
         if array.shape[axis] < length:
             pad_widths = [(0, 0)] * array.ndim
@@ -89,7 +87,7 @@
 
 
 @lru_cache(maxsize=None)
-def mel_filters(device, n_mels: int, filters_path: str=None) -> torch.Tensor:
+def mel_filters(device, n_mels: int, filters_path: str = None) -> torch.Tensor:
     """
     load the mel filterbank matrix for projecting STFT into a Mel spectrogram.
     Allows decoupling librosa dependency; saved using:

--
Gitblit v1.9.1