Format code (#526)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-06-18 10:39:56 +00:00
committed by GitHub
parent f92a923487
commit a7647e4094
7 changed files with 91 additions and 48 deletions

View File

@@ -53,9 +53,9 @@ class PreProcess:
os.makedirs(self.wavs16k_dir, exist_ok=True)
def norm_write(self, tmp_audio, idx0, idx1):
tmp_max=np.abs(tmp_audio).max()
if(tmp_max>2.5):
print("%s-%s-%s-filtered"%(idx0,idx1,tmp_max))
tmp_max = np.abs(tmp_audio).max()
if tmp_max > 2.5:
print("%s-%s-%s-filtered" % (idx0, idx1, tmp_max))
return
tmp_audio = (tmp_audio / tmp_max * (self.max * self.alpha)) + (
1 - self.alpha