espnet2.gan_tts.melgan.pqmf.PQMF
Less than 1 minute
espnet2.gan_tts.melgan.pqmf.PQMF
class espnet2.gan_tts.melgan.pqmf.PQMF(subbands: int = 4, taps: int = 62, cutoff_ratio: float = 0.142, beta: float = 9.0)
Bases: Module
PQMF module.
This module is based on Near-perfect-reconstruction pseudo-QMF banks.
Initilize PQMF module.
The cutoff_ratio and beta parameters are optimized for #subbands = 4. See dicussion in https://github.com/kan-bayashi/ParallelWaveGAN/issues/195.
- Parameters:
- subbands (int) – The number of subbands.
- taps (int) – The number of filter taps.
- cutoff_ratio (float) – Cut-off frequency ratio.
- beta (float) – Beta coefficient for kaiser window.
analysis(x: Tensor) → Tensor
Analysis with PQMF.
- Parameters:x (Tensor) – Input tensor (B, 1, T).
- Returns: Output tensor (B, subbands, T // subbands).
- Return type: Tensor
synthesis(x: Tensor) → Tensor
Synthesis with PQMF.
- Parameters:x (Tensor) – Input tensor (B, subbands, T // subbands).
- Returns: Output tensor (B, 1, T).
- Return type: Tensor