Tacotron2TTSBundle.Vocoder¶
- class torchaudio.pipelines.Tacotron2TTSBundle.Vocoder¶
Tacotron2TTS 管道的声码器部分接口
有关用法,请参阅
torchaudio.pipelines.Tacotron2TTSBundle.get_vocoder()
。
属性¶
sample_rate¶
方法¶
__call__¶
- abstract Vocoder.__call__(specgrams: Tensor, lengths: Optional[Tensor] = None) Tuple[Tensor, Optional[Tensor]] ¶
从给定输入(如频谱图)生成波形
- 参数:
specgrams (Tensor) – 输入频谱图。形状:(batch, 频率箱数, 时间)。预期形状取决于具体实现。
lengths (Tensor, 或 None, 可选) – 批次中每个样本的有效长度。形状:(batch, )。(默认值:None)
- 返回:
- Tensor
生成的波形。形状:(batch, 最大长度)
- Tensor 或 None
批次中每个样本的有效长度。形状:(batch, )。
- 返回类型:
(Tensor, Optional[Tensor])