Tacotron2TTSBundle.Vocoder¶
- class torchaudio.pipelines.Tacotron2TTSBundle.Vocoder¶
Tacotron2TTS pipeline 中 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, 可選) – 批處理中每個樣本的有效長度。形狀:(batch, )。(預設值:None)
- 返回:
- Tensor
生成的波形。形狀:(batch, max length)
- Tensor or None
批處理中每個樣本的有效長度。形狀:(batch, )。
- 返回型別:
(Tensor, Optional[Tensor])