Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about the creation of the Sinc filterbank #107

Open
fColangelo opened this issue Sep 16, 2021 · 0 comments
Open

Question about the creation of the Sinc filterbank #107

fColangelo opened this issue Sep 16, 2021 · 0 comments

Comments

@fColangelo
Copy link

fColangelo commented Sep 16, 2021

Hi and thank you for sharing the code!
I was studying the creation of the Sinc filterbank in the SincConv_fast class and I have a question about this section:

        band=(high-low)[:,0]
        
        f_times_t_low = torch.matmul(low, self.n_)
        f_times_t_high = torch.matmul(high, self.n_)

        band_pass_left=((torch.sin(f_times_t_high)-torch.sin(f_times_t_low))/(self.n_/2))*self.window_ # Equivalent of Eq.4 of the reference paper (SPEAKER RECOGNITION FROM RAW WAVEFORM WITH SINCNET). I just have expanded the sinc and simplified the terms. This way I avoid several useless computations. 
        band_pass_center = 2*band.view(-1,1)
        band_pass_right= torch.flip(band_pass_left,dims=[1])
        
        
        band_pass=torch.cat([band_pass_left,band_pass_center,band_pass_right],dim=1)

I understand that band_pass_left is the left half of the filterbank and that the right part is built by symmetry. However, I cannot understand why the middle of the filterbank is created using 2*band, which from my understanding should be the bandwidth of the individual filters.
Could you please clarify?
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant