# Voice sample prediction scheme

I have some telephone voice audio with occasional "blips" in the audio. The blips appear to come from an IP link buried in the PSTN (this is a conceptual explanation, so don't worry about things like packet loss concealment). When a packet is dropped, there isn't a gap In the audio, instead, the audio has been spliced together causing a small discontinuity.

I am looking for a way to identify the discontinuities programmatically. The most important feature of the identification is accurate time localization. Also it isn't critical that all discontinuities be detected. Even half would be sufficient. My goal is to identify the time differences between detected discontinuities. I can use this information to consider what processes may be involved in the errors.

I've tried all kinds of spectral / wavelet analysis to look for the discontinuities, but these methods have been no more effective that scanning the data (in a wave viewer) in the time domain and making judgments about the signal values. Occasionally conditions are just right so you can clearly identify a discontinuity in the time domain. In general the identification is very difficult.

So I've thought about another approach. The audio signal is human voice, so the correlation characteristics are well defined. I'm thinking I can take advantage of this and look for “outliers” in the data.

So here is the basic problem:

I have human voice that has been transmitted over a band limited channel with BW [200-3600Hz]. The sample rate is 8KHz, the audio encoding is 16 bit linear PCM.

Lets say I have data that runs for 10000 samples, call that number N and the data samples x[n].

I would like to create an estimator that scans through the data, working on M samples at a time and advancing through the data in 1 sample increments.

M is in the order of 10 to 100 samples.

Given samples x[n] to x[n+M], I want to estimate x[n+M+1].

This seems like a standard estimation problem, but I'm not trying to estimate x[n] in the presence of AWGN, I am trying to predict x[n] from previous M values given the known correlation between samples of a human voice signal.

Call the estimate e[n]. I will then compare e[n] with x[n] and use a threshold to identify if the data is probably an outlier.

So the punch line is ... $$\text{What is a good algorithm for producing e[n]}$$

The estimator parameters can be approached in two ways...
1) derive parameters from the data
2) impose the parameters based on the known characteristics of human speech

As for a priori information:

PSD for male or female voice (average/typical) is available
Probability distributions for modeling human voice are available

I'm just looking for some direction on the estimation approach.

I have Mathematic to crunch numbers and try out various approaches and assumptions.

Thanks.

-
Since it's very similar to what you're proposing, have you read literature on linear prediction techniques? –  Jason R Jan 30 '13 at 14:49
No specific suggestions, so I'm going to experiment with a few options mostly based on the LP approach (@JasonR). I can try creating an AR model from the data and predict from that. Alternatively I can try a LMS algorithm to estimate the prediction coefficients from the data and roll my own prediction filter (instead of using something canned). One other option is a scheme I've seen for sample validation using a Kalman estimator. I'll report anything interesting as an answer. –  user2718 Feb 4 '13 at 15:21
I've gotten modest results using a "canned" AR model that is trained with the data set and a "canned" forcasting algorithm (some form of LPC) that operates on a smaller window of data (typicaly 10 samples) from the data set. Only a few points of data appear to be outliers. The canned functions doen't seem to offer sufficient control over how the data is processed and are extremely slow, so I think now the method will be to implement a LMS algorithm where I have better control of the data processing. –  user2718 Feb 20 '13 at 16:03
I tried using linear prediction techniques that are "canned" in Mathematica. I got marginally useful results. I haven't tried to refine the technique, but it is computationally intensive. I've been reading a little about Kalman filter structures. I am going to try setting up a Kalman filter with validation gate next and see how that works. It seems like a natural fit for the problem. –  user2718 May 20 at 11:47