From c7c79b94bd9dc069477de56edcc620c6ecbc8768 Mon Sep 17 00:00:00 2001 From: Eric Lam Date: Thu, 25 Jan 2024 11:55:40 +0000 Subject: [PATCH 1/2] (fix)Audio2Mel device inconsistent issue --- funcodec/models/codec_basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/funcodec/models/codec_basic.py b/funcodec/models/codec_basic.py index 6932d58..51c5f74 100644 --- a/funcodec/models/codec_basic.py +++ b/funcodec/models/codec_basic.py @@ -32,7 +32,7 @@ def __init__( n_mel_channels=80, mel_fmin=0.0, mel_fmax=None, - device='cuda' + device='cpu' ): super().__init__() ############################################## @@ -42,7 +42,7 @@ def __init__( mel_basis = librosa_mel_fn( sr=sampling_rate, n_fft=n_fft, n_mels=n_mel_channels, fmin=mel_fmin, fmax=mel_fmax ) - mel_basis = torch.from_numpy(mel_basis).cuda().float() + mel_basis = torch.from_numpy(mel_basis).to(device).float() self.register_buffer("mel_basis", mel_basis) self.register_buffer("window", window) self.n_fft = n_fft From 541c345a3ad3c30dbd7d587305a8f8c664f29bbe Mon Sep 17 00:00:00 2001 From: Eric Lam Date: Fri, 19 Dec 2025 04:15:38 +0800 Subject: [PATCH 2/2] Update setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c535955..ab9f8bb 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ # ENH # "ci_sdr", "pytorch_wpe", - "editdistance==0.5.2", + "editdistance", "tensorboard>=1.15", "g2p", # PAI @@ -156,4 +156,4 @@ "License :: OSI Approved :: Apache Software License", "Topic :: Software Development :: Libraries :: Python Modules", ], -) \ No newline at end of file +)