From 5f3f194ffd459fd5ebe6ea46da5e532820a66060 Mon Sep 17 00:00:00 2001
From: 嘉渊 <wangjiaming.wjm@alibaba-inc.com>
Date: 星期五, 21 七月 2023 11:24:31 +0800
Subject: [PATCH] update
---
egs/callhome/eend_ola/local/split.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/egs/callhome/eend_ola/local/split.py b/egs/callhome/eend_ola/local/split.py
index 0ff9e47..aa50b1e 100644
--- a/egs/callhome/eend_ola/local/split.py
+++ b/egs/callhome/eend_ola/local/split.py
@@ -11,7 +11,7 @@
scp_files = os.listdir(work_path)
reco2dur_dict = {}
- with (os.path.join(root_path, 'reco2dur')) as f:
+ with open(os.path.join(root_path, 'reco2dur')) as f:
lines = f.readlines()
for line in lines:
parts = line.strip().split()
@@ -59,12 +59,12 @@
utt2spk_dict[rec].append((parts[0], parts[1]))
for file in scp_files:
- scp_file = work_path + file
+ scp_file = os.path.join(work_path, file)
idx = scp_file.split('.')[-2]
- reco2dur_file = os.path.join(work_path, 'reco2dur.'.format(str(idx)))
- spk2utt_file = os.path.join(work_path, 'spk2utt.'.format(str(idx)))
- segment_file = os.path.join(work_path, 'segments.'.format(str(idx)))
- utt2spk_file = os.path.join(work_path, 'utt2spk.'.format(str(idx)))
+ reco2dur_file = os.path.join(work_path, 'reco2dur.{}'.format(str(idx)))
+ spk2utt_file = os.path.join(work_path, 'spk2utt.{}'.format(str(idx)))
+ segment_file = os.path.join(work_path, 'segments.{}'.format(str(idx)))
+ utt2spk_file = os.path.join(work_path, 'utt2spk.{}'.format(str(idx)))
fpp = open(scp_file)
scp_lines = fpp.readlines()
--
Gitblit v1.9.1