def test_synthesis_from_codeap(self):
path = dirpath + '/data/test16000.wav'
fs, x = wavfile.read(path)
af = FeatureExtractor(analyzer='world', fs=fs, shiftms=5)
f0, spc, ap = af.analyze(x)
codeap = af.codeap()
assert len(np.nonzero(f0)[0]) > 0
assert spc.shape == ap.shape
assert pyworld.get_num_aperiodicities(fs) == codeap.shape[-1]
ap = pyworld.decode_aperiodicity(codeap, fs, 1024)
synth = Synthesizer(fs=fs, fftl=1024, shiftms=5)
wav = synth.synthesis_spc(f0, spc, ap)
nun_check(wav)
评论列表
文章目录