From a43b871e9e450eb877badab31e03caafaa997219 Mon Sep 17 00:00:00 2001 From: nl8590687 <3210346136@qq.com> Date: Sat, 28 Apr 2018 16:52:07 +0800 Subject: [PATCH] fix bug and wish it wont boom again~ --- readdata22_2.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/readdata22_2.py b/readdata22_2.py index 6f1e9d6..9905fd2 100644 --- a/readdata22_2.py +++ b/readdata22_2.py @@ -131,8 +131,9 @@ class DataSpeech(): else: n = n_start // bili * (bili - 1) yushu = n_start % bili - filename = self.dic_wavlist_stcmds[self.list_wavnum_stcmds[n + yushu - 1]] - list_symbol=self.dic_symbollist_stcmds[self.list_symbolnum_stcmds[n + yushu - 1]] + length=len(self.list_wavnum_stcmds) + filename = self.dic_wavlist_stcmds[self.list_wavnum_stcmds[(n + yushu - 1)%length]] + list_symbol=self.dic_symbollist_stcmds[self.list_symbolnum_stcmds[(n + yushu - 1)%length]] if('Windows' == plat.system()): filename = filename.replace('/','\\') # windows系统下需要执行这一行,对文件路径做特别处理