SquimObjective¶
- class torchaudio.models.SquimObjective(encoder: Module, dprnn: Module, branches: ModuleList)[source]¶
語音品質和可理解度量測 (SQUIM) 模型,用於預測語音增強的客觀指標分數 (例如,STOI、PESQ 和 SI-SDR)。
- 參數:
encoder (torch.nn.Module) – 編碼器模組,用於將 1D 波形轉換為 2D 特徵表示。
dprnn (torch.nn.Module) – DPRNN 模組,用於建模序列特徵。
branches (torch.nn.ModuleList) – Transformer 分支,每個分支估計一個客觀指標分數。
- 使用
SquimObjective
的教學
方法¶
forward¶
- SquimObjective.forward(x: Tensor) List[Tensor] [source]¶
- 參數:
x (torch.Tensor) – 輸入波形。維度為 (batch, time) 的 Tensor。
- 回傳:
分數 Tensor 列表。每個 Tensor 的維度為 (batch,)。
- 回傳類型:
List(torch.Tensor)
工廠函數¶
建置一個自訂的 |
|
使用預設參數建置 |