I'm working on an experimental diphone / unit selection speech synthesizer for my native language which lacks good speech synthesizer for blind people.

The problem is that recorded unit library can get very huge (hundreds of megabytes, as seen in the best speech synthesizers out there).

I have seen a few high quality diphone synthesizers with small voice sample libraries. When reading various papers about speech synthesis and, specifically, about those smaller synthesizers, they say they have used LPC (linear predictive coding) to make their voice sample library much smaller in size, and also they say that LPC give them additional benefits of easier pitch control when assembling speech from voice samples.

Unfortunately I could not find any beginner level tutorials for the use of LPC to compress voice samples. All the materials I managed to find are full of university level math. I think I don't need to study all of that just to use LPC (if I can use an FFT library for generating frequency graphs in my software, I should be able to use an LPC library in similar "black box" manner, right?).

The only more or less "production ready" code I managed to find seems to be this one.

It has four LPC related folders - openlpc, lpc, lpc10 and celp. Their header files have just a few functions, but unfortunately there are no unit tests or tutorials demonstrating their usage for voice sample compression/decompression.

Could someone experienced in DSP please take a look and give some explanations for those functions? For example, the ones in this file.

I would like to see a simple demo for feeding raw PCM wave bytes (in what format?) into LPC encoder for compression and then later feeding compressed data back into the LPC decoder together with additional parameters (what are their values and effect on the decoded result?).

What is the difference between openlpc, lpc, lpc10 an celp and which one is most appropriate for my purpose?

I'm open also to other LPC compression/decompression solutions, in case if you can suggest something better and more thoroughly documented than the VoiceCodec project code above.

Notice - please, do not explain internal workings of LPC; in my case it would be like explaining fuel chemistry to a person who just wants to learn how to drive a car.

  • 1
    $\begingroup$ Unfortunately a successful implementation of LPC for speech compression requires more than just calling some functions. This is especially true for libraries; you should know a lot about what's happening inside, several audio parameters, along with input and output signal interpretations. May be you should look for a program that can encode and decode using LPC technology. But then calling from your c code could be problematic. Btw, afaik, bare bones programming questioned are not allowed in dsp.se as a matter of fact. $\endgroup$ – Fat32 Feb 12 '17 at 23:14
  • $\begingroup$ I have searched for options but it seems all existing LPC implementations are hidden inside proprietary closed source synthesizers or exist in some university research projects, which usually are "a proof of concept" and not something in form of reusable code with clear API. I also asked this question on stackoverflow.com but got no response at all - I guess, the chance for a DSP programmer to notice my question there is much lower than here. I'll try some DSP dedicated forums instead. $\endgroup$ – JustAMartin Feb 15 '17 at 10:52
  • 1
    $\begingroup$ I suggest you a book from which you can read and almost implement a basic version of LPC speech coder: "Introduction to Data Compression by K.H.Sayood" its 3rd and 4th editions include the chapters 17 and 18 discuss LPC based voice coding in a highly readable manner. Give it a try, then come back and ask here when there are any points that you struggle to understand. I hope this helps. For linear predictive coding you should know basics of signal sampling, filtering, frequencies, prediction, quantization and some probability. But dont worry just come and ask for an explanation if needed. $\endgroup$ – Fat32 Feb 15 '17 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.