From d2dc3af1a69ee4075bcfc0c83dc0fb8e3fc1db4e Mon Sep 17 00:00:00 2001
From: yhliang <68215459+yhliang-aslp@users.noreply.github.com>
Date: 星期四, 11 五月 2023 16:31:40 +0800
Subject: [PATCH] Merge pull request #492 from alibaba-damo-academy/dev_smohan

---
 funasr/utils/wav_utils.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/funasr/utils/wav_utils.py b/funasr/utils/wav_utils.py
index d7afe4a..ebb80d2 100644
--- a/funasr/utils/wav_utils.py
+++ b/funasr/utils/wav_utils.py
@@ -299,7 +299,7 @@
     wav_dict = {}
     for line in wav_lines:
         parts = line.strip().split()
-        if len(parts) < 2:
+        if len(parts) != 2:
             continue
         sample_name, wav_path = parts
         wav_dict[sample_name] = wav_path
@@ -309,7 +309,7 @@
         if len(parts) < 2:
             continue
         sample_name = parts[0]
-        text_dict[sample_name] = " ".join(parts[1:])
+        text_dict[sample_name] = " ".join(parts[1:]).lower()
     filter_count = 0
     with open(wav_file, "w") as f_wav, open(text_file, "w") as f_text:
         for sample_name, wav_path in wav_dict.items():

--
Gitblit v1.9.1