| | |
| | | """Sinc convolutions.""" |
| | | import math |
| | | import torch |
| | | from typeguard import check_argument_types |
| | | from typing import Union |
| | | |
| | | |
| | |
| | | window_func: Window function on the filter, one of ["hamming", "none"]. |
| | | fs (str, int, float): Sample rate of the input data |
| | | """ |
| | | assert check_argument_types() |
| | | super().__init__() |
| | | window_funcs = { |
| | | "none": self.none_window, |
| | |
| | | torch.Tensor: Filter start frequencíes. |
| | | torch.Tensor: Filter stop frequencies. |
| | | """ |
| | | assert check_argument_types() |
| | | # min and max bandpass edge frequencies |
| | | min_frequency = torch.tensor(30.0) |
| | | max_frequency = torch.tensor(fs * 0.5) |
| | |
| | | torch.Tensor: Filter start frequencíes. |
| | | torch.Tensor: Filter stop frequencíes. |
| | | """ |
| | | assert check_argument_types() |
| | | # min and max BARK center frequencies by approximation |
| | | min_center_frequency = torch.tensor(70.0) |
| | | max_center_frequency = torch.tensor(fs * 0.45) |