disable pw in audio that causes numpy issue

This commit is contained in:
Eren Gölge 2021-02-01 17:05:03 +00:00
parent 2cd44cbc9d
commit 2edab4b3f9
2 changed files with 11 additions and 11 deletions

View File

@ -3,7 +3,7 @@ import soundfile as sf
import numpy as np import numpy as np
import scipy.io.wavfile import scipy.io.wavfile
import scipy.signal import scipy.signal
import pyworld as pw # import pyworld as pw
from TTS.tts.utils.data import StandardScaler from TTS.tts.utils.data import StandardScaler
@ -292,15 +292,15 @@ class AudioProcessor(object):
return pad // 2, pad // 2 + pad % 2 return pad // 2, pad // 2 + pad % 2
### Compute F0 ### ### Compute F0 ###
def compute_f0(self, x): # def compute_f0(self, x):
f0, t = pw.dio( # f0, t = pw.dio(
x.astype(np.double), # x.astype(np.double),
fs=self.sample_rate, # fs=self.sample_rate,
f0_ceil=self.mel_fmax, # f0_ceil=self.mel_fmax,
frame_period=1000 * self.hop_length / self.sample_rate, # frame_period=1000 * self.hop_length / self.sample_rate,
) # )
f0 = pw.stonemask(x.astype(np.double), f0, t, self.sample_rate) # f0 = pw.stonemask(x.astype(np.double), f0, t, self.sample_rate)
return f0 # return f0
### Audio Processing ### ### Audio Processing ###
def find_endpoint(self, wav, threshold_db=-40, min_silence_sec=0.8): def find_endpoint(self, wav, threshold_db=-40, min_silence_sec=0.8):

View File

@ -27,7 +27,7 @@ args, unknown_args = parser.parse_known_args()
# Remove our arguments from argv so that setuptools doesn't see them # Remove our arguments from argv so that setuptools doesn't see them
sys.argv = [sys.argv[0]] + unknown_args sys.argv = [sys.argv[0]] + unknown_args
version = '0.0.9.1' version = '0.0.9.2'
cwd = os.path.dirname(os.path.abspath(__file__)) cwd = os.path.dirname(os.path.abspath(__file__))
# Handle Cython code # Handle Cython code