From 6fa8ee48e117fa9c3bef450e02776e8c26b278e7 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期六, 30 三月 2024 10:13:42 +0800
Subject: [PATCH] Dev gzf new (#1567)

---
 funasr/datasets/audio_datasets/scp2jsonl.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/funasr/datasets/audio_datasets/scp2jsonl.py b/funasr/datasets/audio_datasets/scp2jsonl.py
index 00754dd..0764298 100644
--- a/funasr/datasets/audio_datasets/scp2jsonl.py
+++ b/funasr/datasets/audio_datasets/scp2jsonl.py
@@ -68,7 +68,7 @@
         if os.path.exists(line):
             waveform, _ = librosa.load(line, sr=16000)
             sample_num = len(waveform)
-            context_len = int(sample_num//16000*1000/10)
+            context_len = int(sample_num/16000*1000/10)
         else:
             context_len = len(line.split()) if " " in line else len(line)
         res[key] = {data_type: line, f"{data_type}_len": context_len}
@@ -79,6 +79,7 @@
 def main_hydra(cfg: DictConfig):
  
     kwargs = OmegaConf.to_container(cfg, resolve=True)
+    print(kwargs)
 
     scp_file_list = kwargs.get("scp_file_list", ("/Users/zhifu/funasr1.0/test_local/wav.scp", "/Users/zhifu/funasr1.0/test_local/text.txt"))
     if isinstance(scp_file_list, str):

--
Gitblit v1.9.1