FastSpeech2 icon indicating copy to clipboard operation
FastSpeech2 copied to clipboard

I think there's a bug in preprocess.py

Open 5Hyeons opened this issue 2 years ago • 0 comments

https://github.com/ming024/FastSpeech2/blob/d4e79eb52e8b01d24703b2dfc0385544092958f3/preprocessor/preprocessor.py#L77-L90

On line 77, If there is no tg_path, the previous pitch, energy, and frame information will be included in the statistics. If there is no tg_path from the beginning, it will cause an name error.

Is this intended? If not, it would be better to add the following two lines to line 89.

if os.path.exists(tg_path): 
     ret = self.process_utterance(speaker, basename) 
     if ret is None: 
         continue 
     else: 
         info, pitch, energy, n = ret 
     out.append(info) 
else:    # here !
    continue

5Hyeons avatar Apr 11 '22 12:04 5Hyeons