From fe64723555a1501e30da8773f4cf86f10f1e26c9 Mon Sep 17 00:00:00 2001 From: takenori-y Date: Tue, 20 Aug 2024 10:53:40 +0900 Subject: [PATCH 1/2] add period --- diffsptk/modules/ap.py | 4 ++-- diffsptk/modules/linear_intpl.py | 2 +- diffsptk/modules/magic_intpl.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/diffsptk/modules/ap.py b/diffsptk/modules/ap.py index 0de6d54d..f77e438e 100644 --- a/diffsptk/modules/ap.py +++ b/diffsptk/modules/ap.py @@ -123,11 +123,11 @@ def forward(self, x, f0): d = x.dim() if d == 1: x = x.unsqueeze(0) - assert x.dim() == 2, "Input must be 2D tensor" + assert x.dim() == 2, "Input must be 2D tensor." if f0.dim() == 1: f0 = f0.unsqueeze(0) - assert f0.dim() == 2, "Input must be 2D tensor" + assert f0.dim() == 2, "Input must be 2D tensor." ap = self.convert(self.extractor(x, f0)) diff --git a/diffsptk/modules/linear_intpl.py b/diffsptk/modules/linear_intpl.py index 79527f12..db62ad88 100644 --- a/diffsptk/modules/linear_intpl.py +++ b/diffsptk/modules/linear_intpl.py @@ -76,7 +76,7 @@ def _forward(x, upsampling_factor): x = x.view(1, -1, 1) elif d == 2: x = x.unsqueeze(0) - assert x.dim() == 3, "Input must be 3D tensor" + assert x.dim() == 3, "Input must be 3D tensor." B, T, D = x.shape x = x.transpose(-2, -1).contiguous() # (B, D, T) diff --git a/diffsptk/modules/magic_intpl.py b/diffsptk/modules/magic_intpl.py index 73b19b78..a6b60bb1 100644 --- a/diffsptk/modules/magic_intpl.py +++ b/diffsptk/modules/magic_intpl.py @@ -94,7 +94,7 @@ def forward(ctx, x, magic_number): x = x.view(1, -1, 1) elif d == 2: x = x.unsqueeze(0) - assert x.dim() == 3, "Input must be 3D tensor" + assert x.dim() == 3, "Input must be 3D tensor." B, T, D = x.shape def compute_lerp_inputs(x, magic_number): From d791fadf2c5e1a4907739ae08fa9a65593809372 Mon Sep 17 00:00:00 2001 From: takenori-y Date: Tue, 20 Aug 2024 10:56:27 +0900 Subject: [PATCH 2/2] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4b53ee6..9d4dc3ed 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ *diffsptk* is a differentiable version of [SPTK](https://github.com/sp-nitech/SPTK) based on the PyTorch framework. [![Latest Manual](https://img.shields.io/badge/docs-latest-blue.svg)](https://sp-nitech.github.io/diffsptk/latest/) -[![Stable Manual](https://img.shields.io/badge/docs-stable-blue.svg)](https://sp-nitech.github.io/diffsptk/2.1.1/) +[![Stable Manual](https://img.shields.io/badge/docs-stable-blue.svg)](https://sp-nitech.github.io/diffsptk/2.2.0/) [![Downloads](https://static.pepy.tech/badge/diffsptk)](https://pepy.tech/project/diffsptk) [![Python Version](https://img.shields.io/pypi/pyversions/diffsptk.svg)](https://pypi.python.org/pypi/diffsptk) [![PyTorch Version](https://img.shields.io/badge/pytorch-2.0.0%20%7C%202.4.0-orange.svg)](https://pypi.python.org/pypi/diffsptk)