unpin cython version and commentout pyworld in audio.py causing dep

issues
This commit is contained in:
Eren Gölge 2021-02-01 11:34:05 +00:00
parent 5beed0ddcd
commit 8774e37444
2 changed files with 12 additions and 11 deletions

View File

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

View File

@ -21,5 +21,5 @@ cardboardlint==1.3.0
pylint==2.5.3
gdown
umap-learn
cython==0.29.20 # > 0.29.20 breaks pyworld installation with the min numpy req of Tensorflow 2.4.1
cython
pyyaml