I have wav file of ~2-10sec of user's voice, taken from a conversation. Maybe it's SIMILAR TO a hash code. the general voice verification should look like:

  • wav file -> vector
  • new wav file ->vector
  • compare 2 vectors with cosine similarity

which is the convenient way to store wav file to be able to verify it later on with another wav voice file?

  • 1
    $\begingroup$ It is not possible to do this exactly as stated here. You would have to accept a reasonable deviation within which the two waveforms would be considered "similar". Then, there are many ways by which you can assess that (including hash functions). Accepting some error in any case sets you down the Approximate nearest neighbour approaches. In this case, the vector you are looking for could well be a vector of features. Do you think you could provide some more details? $\endgroup$ – A_A Jan 23 '20 at 14:03
  • $\begingroup$ @A_A thx for giving direction, i searched github heavily , usually some implementations do create some d-vectors and send them to models, my details -i have some 2 wav files and want to verify if it's the same customer $\endgroup$ – ERJAN Jan 24 '20 at 7:07
  • $\begingroup$ Can I please ask if this was resolved? $\endgroup$ – A_A Feb 22 '20 at 9:40

Since you are not trying to verify if two "messages" are identical in a word-to-word sense, it would not be practical to go down the hash-function way.

This sounds more like a "pattern recognition" problem.

The typical approach in this kind of problems is to obtain a set of features from the signal and then, given the features of some query signal, see if they match. The matching there is more in the sense of Euclidean Distance between vectors of features. Of course, other metrics of distance can be used too. This is captured in a straightforward way in the case of the Nearest Neighbour algorithm.

Usually, in the case of speech signals and voice recognition, the Mel Frequency Cepstral Coefficients are used as this vector of features you are after.

You might also find this response useful, as well as this repository.

Hope this helps.

  • $\begingroup$ thx u.......bro i would be grateful if you could clarify this mess i got in my mind from googling 'speach diarization' for 2 weeks haha $\endgroup$ – ERJAN Jan 24 '20 at 10:26
  • $\begingroup$ wav -> MFCC-> feature/image spectrogram(?) -> CNN for image / GMM for feature -> cosine similarity/clustering. is this the whole sequence of steps? $\endgroup$ – ERJAN Jan 24 '20 at 10:29
  • 1
    $\begingroup$ @ERJAN Glad to hear this was somewhat helpful. The view of the spectrogram as an "image" is misleading. The spectrogram does not exist as an image but as a matrix whose content is indexed by time and frequency. For speaker recognition, all that you need is for the features to be landing close enough to previous recordings from a user. For speech recognition you also want the time instances to be close as well. So for the speaker problem (much easier), I would say WAV->MFCC->Train classifier on those features. Or, exactly as you state it, minus the image/CNN aspect. $\endgroup$ – A_A Jan 24 '20 at 15:36

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.