Skip to content

Commit

Permalink
Add win_size clipping and calculation in test_vqt_params function
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Feb 10, 2024
1 parent e2c9a29 commit b30f198
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_all.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import copy
import math

import torch
import numpy as np
Expand Down Expand Up @@ -134,6 +135,11 @@ def test_vqt_params(
n_channels,
n_dim,
):
## Clip win_size to be at most 1001 and just set it
if win_size is not None:
win_size = min(win_size, 1001)
else:
win_size = min(int(math.ceil(Q_lowF * (Fs_sample / F_min))), 1001)
params = {
'Fs_sample': Fs_sample,
'Q_lowF': Q_lowF,
Expand Down

0 comments on commit b30f198

Please sign in to comment.