зеркало из https://github.com/mozilla/TTS.git
disable pw in audio that causes numpy issue
This commit is contained in:
Родитель
2cd44cbc9d
Коммит
2edab4b3f9
|
@ -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,15 @@ 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
|
||||
# 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):
|
||||
|
|
2
setup.py
2
setup.py
|
@ -27,7 +27,7 @@ args, unknown_args = parser.parse_known_args()
|
|||
# Remove our arguments from argv so that setuptools doesn't see them
|
||||
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__))
|
||||
|
||||
# Handle Cython code
|
||||
|
|
Загрузка…
Ссылка в новой задаче