Skip to content

Commit 4d55efc

Browse files
committed
min level
1 parent c6af9b8 commit 4d55efc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

audio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def _build_mel_basis():
7777

7878

7979
def _amp_to_db(x):
80-
return 20 * np.log10(np.maximum(1e-5, x))
80+
min_level = np.exp(hparams.min_level_db / 20 * np.log(10))
81+
return 20 * np.log10(np.maximum(min_level, x))
8182

8283

8384
def _db_to_amp(x):

0 commit comments

Comments
 (0)