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系统下需要执行这一行,对文件路径做特别处理