https://github.com/zzw922cn/lpc_for_tts
Linear Prediction Coefficients estimation from mel-spectrogram implemented in Python based on Levinson-Durbin algorithm.
https://github.com/zzw922cn/lpc_for_tts
audiocompression lpc lpcnet mel-spectrogram tts vocoder wavernn
Last synced: 5 months ago
JSON representation
Linear Prediction Coefficients estimation from mel-spectrogram implemented in Python based on Levinson-Durbin algorithm.
- Host: GitHub
- URL: https://github.com/zzw922cn/lpc_for_tts
- Owner: zzw922cn
- Created: 2021-03-19T11:43:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-19T11:50:27.000Z (over 4 years ago)
- Last Synced: 2023-10-21T00:08:42.885Z (almost 2 years ago)
- Topics: audiocompression, lpc, lpcnet, mel-spectrogram, tts, vocoder, wavernn
- Language: Python
- Homepage:
- Size: 652 KB
- Stars: 63
- Watchers: 6
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this 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。
```Python
from audio import *
import numpy as np
from hparams import Hparams as hparamsinput_wav_file = 'test.wav'
sample_rate = 24000
lpc_order = 8orig_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:
Predicted audio:
Prediction error:
