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

Reducing n_mel_channels to 40: Error of size mismatch #206

Closed
fatihkiralioglu opened this issue Jun 5, 2020 · 2 comments
Closed

Reducing n_mel_channels to 40: Error of size mismatch #206

fatihkiralioglu opened this issue Jun 5, 2020 · 2 comments

Comments

@fatihkiralioglu
Copy link

fatihkiralioglu commented Jun 5, 2020

Hi, I'm trying to model a 8khz tacotron2 and waveglow model. In this scheme, I also reduce the n_mel_channels to 40.

"waveglow_config": {
        "n_mel_channels": 40,
        "n_flows": 12,
        "n_group": 8,
        "n_early_every": 4,
        "n_early_size": 2,
        "WN_config": {
            "n_layers": 8,
            "n_channels": 256,
            "kernel_size": 3
        }
    }
}

At the start of waveglow training, i got the error:
RuntimeError: Given transposed=1, weight of size 40 40 1024, expected input[12, 80, 81] to have 40 channels, but got 80 channels instead

I guess there is a place in the project where, a fixed mel size of 80 is expencted but i could not figure out where it is.

Thanks.

@fatihkiralioglu fatihkiralioglu changed the title Reducing n_mel_channels 40: Error Reducing n_mel_channels to 40: Error of size mismatch Jun 5, 2020
@CookiePPP
Copy link

CookiePPP commented Jun 5, 2020

change
https://github.com/NVIDIA/waveglow/blob/master/mel2samp.py#L70#L74

        self.stft = TacotronSTFT(filter_length=filter_length,
                                 hop_length=hop_length,
                                 win_length=win_length,
                                 sampling_rate=sampling_rate,
                                 mel_fmin=mel_fmin, mel_fmax=mel_fmax)

to include
n_mel_channels=40

        self.stft = TacotronSTFT(filter_length=filter_length,
                                 hop_length=hop_length,
                                 win_length=win_length,
                                 n_mel_channels=40,
                                 sampling_rate=sampling_rate,
                                 mel_fmin=mel_fmin, mel_fmax=mel_fmax)

You should also update the denoiser
https://github.com/NVIDIA/waveglow/search?q=80&unscoped_q=80


Also, if you're changing more params
#88
might be useful.

@fatihkiralioglu
Copy link
Author

@CookiePPP, Thank you, it worked flawlesly.

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

2 participants