Skip to content

Commit c6af9b8

Browse files
committed
Rollback to previous log compression↲
I had misunderstood how log compression is done in Tactron2. The old code already did clipping same way as mentioned in Tacotron2. Althrough the threshold is different between ours (1e-5) and Tacotron2 (0.01), I think it's safe to keep the value as is because it has been tested for months. We can try 0.01 later. should fix #43
1 parent 6f0495e commit c6af9b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

audio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ def _build_mel_basis():
7777

7878

7979
def _amp_to_db(x):
80-
return 20 * np.log10(x + 0.01)
80+
return 20 * np.log10(np.maximum(1e-5, x))
8181

8282

8383
def _db_to_amp(x):
84-
return np.maximum(np.power(10.0, x * 0.05) - 0.01, 0.0)
84+
return np.power(10.0, x * 0.05)
8585

8686

8787
def _normalize(S):

0 commit comments

Comments
 (0)