From 2b99858a7713628b41199c009f09c2cf70a42b2b Mon Sep 17 00:00:00 2001 From: takenori-y Date: Mon, 28 Oct 2024 16:12:26 +0900 Subject: [PATCH 1/2] support changing n_fft --- diffsptk/modules/mglsadf.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/diffsptk/modules/mglsadf.py b/diffsptk/modules/mglsadf.py index c7d0b9d6..4eaf76b9 100644 --- a/diffsptk/modules/mglsadf.py +++ b/diffsptk/modules/mglsadf.py @@ -88,6 +88,10 @@ class PseudoMGLSADigitalFilter(nn.Module): the impulse response converted from input mel-cepstral coefficients using FFT. 'freq-domain' performs filtering in the frequency domain rather than time one. + n_fft : int >= 1 + Number of FFT bins used for conversion. Higher values result in increased + conversion accuracy. + taylor_order : int >= 0 Order of Taylor series expansion (valid only if **mode** is 'multi-stage'). @@ -97,9 +101,6 @@ class PseudoMGLSADigitalFilter(nn.Module): ir_length : int >= 1 Length of impulse response (valid only if **mode** is 'single-stage'). - n_fft : int >= 1 - Number of FFT bins for conversion (valid only if **mode** is 'single-stage'). - **kwargs : additional keyword arguments See :func:`~diffsptk.ShortTimeFourierTransform` (valid only if **mode** is 'freq-domain'). @@ -213,6 +214,7 @@ def __init__( phase="minimum", taylor_order=20, cep_order=199, + n_fft=512, ): super().__init__() @@ -239,6 +241,7 @@ def __init__( cep_order, in_alpha=alpha, in_gamma=gamma, + n_fft=n_fft, ) self.linear_intpl = LinearInterpolation(frame_period) From c2eac8a1af68a7bc715be2c8ea00a2c7bbd247e0 Mon Sep 17 00:00:00 2001 From: takenori-y Date: Tue, 29 Oct 2024 10:11:40 +0900 Subject: [PATCH 2/2] check pytorch 2.5 --- .github/workflows/ci.yml | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bee706b8..046b31c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,8 @@ jobs: torch: 2.0.0 torchaudio: 2.0.1 - python: 3.12 - torch: 2.4.1 - torchaudio: 2.4.1 + torch: 2.5.0 + torchaudio: 2.5.0 steps: - name: Clone diff --git a/README.md b/README.md index b8a811e6..f9b38a1a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![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.1-orange.svg)](https://pypi.python.org/pypi/diffsptk) +[![PyTorch Version](https://img.shields.io/badge/pytorch-2.0.0%20%7C%202.5.0-orange.svg)](https://pypi.python.org/pypi/diffsptk) [![PyPI Version](https://img.shields.io/pypi/v/diffsptk.svg)](https://pypi.python.org/pypi/diffsptk) [![Codecov](https://codecov.io/gh/sp-nitech/diffsptk/branch/master/graph/badge.svg)](https://app.codecov.io/gh/sp-nitech/diffsptk) [![License](https://img.shields.io/github/license/sp-nitech/diffsptk.svg)](https://github.com/sp-nitech/diffsptk/blob/master/LICENSE)