From a7139cb73b1ecf21e15df0096150da9d64ce2be2 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 16 二月 2023 10:46:25 +0800
Subject: [PATCH] Merge branch 'main' of github.com:alibaba-damo-academy/FunASR add

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

diff --git a/funasr/utils/wav_utils.py b/funasr/utils/wav_utils.py
index 76ed678..590ccdb 100644
--- a/funasr/utils/wav_utils.py
+++ b/funasr/utils/wav_utils.py
@@ -311,7 +311,7 @@
         sample_name, txt = parts
         text_dict[sample_name] = txt
     filter_count = 0
-    with open(wav_file) as f_wav, open(text_file) as f_text:
+    with open(wav_file, "w") as f_wav, open(text_file, "w") as f_text:
         for sample_name, wav_path in wav_dict.items():
             if sample_name in text_dict.keys():
                 f_wav.write(sample_name + " " + wav_path  + "\n")

--
Gitblit v1.9.1