LPC For TTS Save

Linear Prediction Coefficients estimation from mel-spectrogram implemented in Python based on Levinson-Durbin algorithm.

Project README

LPC_for_TTS

Linear Prediction Coefficients estimation from mel-spectrogram implemented in Python based on Levinson-Durbin algorithm.

基于Levinson-Durbin归纳法来做线性预测系数的估计。此代码可用于LPC系数的估计,也可用于LPCNet等合成器的特征提取。流程是从音频得到梅尔谱,梅尔谱得到LPC。

from audio import *
import numpy as np
from hparams import Hparams as hparams

input_wav_file = 'test.wav'
sample_rate = 24000
lpc_order = 8

orig_audio, pred_audio, residual, lpcs = lpc_audio(input_wav_file, lpc_order, hparams)

save_wav(pred_audio, 'wavs/pred.wav', hparams)
save_wav(orig_audio, 'wavs/orig.wav', hparams)
save_wav(residual, 'wavs/error.wav', hparams)

Raw audio: image

Predicted audio: image

Prediction error: image

Open Source Agenda is not affiliated with "LPC For TTS" Project. README Source: zzw922cn/LPC_for_TTS
Stars
67
Open Issues
0
Last Commit
3 years ago

Open Source Agenda Badge

Open Source Agenda Rating