In essence, yes.
You would have to use something like Dynamic time warping to measure the similarities between two given signals, as long as they vary in time or speed.
From what I can remember, you can use DTW for speaking identification. BUT it is important to note that for single word recognition and single speaker identification this method would work but would not be suitable for commercial or large scale applications.
The DTW algorithm calculates the distances from the two signals, based on the Euclidean distances.. Whilst studying for my undergraduate degree, I did a simple word recognition system (In C++) and the machine learning algorithms (for instance, Hidden Markov Models) provided a much higher success rate than DTW.
Feel free to take a look at some of the code that I wrote for this project. Here
double Euclidean_distance(const vector<double> &actual, const vector<double> &training) {
double distance = 0.0;
for(unsigned i=0; (i < actual.size()); i++)
{
distance = pow((actual[i] - training[i]), 2);
}
return sqrt(distance);
}
double Distance(const std::vector< std::vector<double> > &actual, const std::vector< std::vector<double> > &training)
{
int m = actual.size();
int n = training.size();
double cost[m][n];
cost[0][0] = Euclidean_distance(actual[0], training[0]);
for(int i = 1; i < m; i++)
cost[i][0] = cost[i-1][0] + Euclidean_distance(actual[i], training[0]);
for(int j = 1; j < n; j++)
cost[0][j] = cost[0][j-1] + Euclidean::Euclidean_distance(actual[0], training[j]);
for(int i = 1; i < m; i++)
for(int j = 1; j < n; j++)
cost[i][j] = std::min(cost[i-1][j], std::min(cost[i][j-1], cost[i-1][j-1]))
+ Euclidean_distance(actual[i],training[j]);
return cost[m-1][n-1];
}
(Note this is Academic code, not tested and just illustrate the algorithm)