Skip to content

Commit fbd7ee6

Browse files
authored
add error info
1 parent 7b807d3 commit fbd7ee6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

process.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ def wav2spec(warp):
4545
if f0 is None:
4646
print('error:file_', str(pathslist[0]), '_can not get_pitch ')
4747
return None
48+
except Exception as e:
49+
print('error:', str(pathslist[0]), str(e))
50+
return None
51+
52+
try:
53+
4854
pathslist[1].mkdir(parents=True, exist_ok=True)
4955
np.savez(pathslist[2], audio=audio[0].numpy(), mel=mel[0].T, f0=f0, uv=uv)
5056

@@ -53,8 +59,8 @@ def wav2spec(warp):
5359
Q.put(str(pathslist[2]))
5460
break
5561

56-
except:
57-
print('error:', str(pathslist[0]))
62+
except Exception as e:
63+
print('error:', str(pathslist[0]), str(e))
5864
return None
5965

6066

0 commit comments

Comments
 (0)