Tacotron2TTSBundle.Vocoder¶
- class torchaudio.pipelines.Tacotron2TTSBundle.Vocoder¶
Tacotron2TTS 管道中 vocoder 部分的接口
有关用法,请参阅
torchaudio.pipelines.Tacotron2TTSBundle.get_vocoder()
。
属性¶
sample_rate¶
方法¶
__call__¶
- abstract Vocoder.__call__(specgrams: Tensor, lengths: Optional[Tensor] = None) Tuple[Tensor, Optional[Tensor]] ¶
从给定的输入(例如频谱图)生成波形
- 参数
specgrams (Tensor) – 输入的频谱图。形状:(batch, frequency bins, time)。预期的形状取决于实现。
lengths (Tensor, 或 None, optional) – batch 中每个样本的有效长度。形状:(batch, )。(默认为:None)
- 返回
- 张量
生成的波形。形状:(batch, max length)
- Tensor 或 None
batch 中每个样本的有效长度。形状:(batch, )。
- 返回类型
(Tensor, Optional[Tensor])