Compare voice wav in android or voice tag ( voice commands ) API

风流意气都作罢 提交于 2019-11-29 20:33:32

问题


I'm developing an app and I need some way to compare 2 voices if they' match or not, I know that Voice Recognizer is a way to do that but since (i think) it needs to translate the voice into string first, it won't be so suitable for other language apart from the lang supported by the speech recognizer....any idea? Just like old-day phone used to do, the voice tag where it just compare the voice input with the voice it recorded earlier during the setup


回答1:


A relatively simple way to do this is to use FFT (Fast Fourier Transform) to convert the time-domain data of the original WAV file into frequency-domain data (in which each value in your transformed array represents the relative magnitude/intensity of a particular frequency band).

If the same person speaks the same word twice, the resulting time-domain data will nevertheless still be very different numerically in the two WAV files. Converting both WAV files to the frequency domain (using the same size of FFT window for both, even if the two files are of slightly different lengths) will produce frequency arrays that are much more similar to each other than were the original WAV files.

Unfortunately, I haven't been able to find any FFT libraries specifically for Android. Here's a question that references some Java-based libraries:

Signal processing library in Java?




回答2:


An idea is comparing the similarity of the voices in their spectograms. The features in spectrogram is robust and resist to noise which is a good reference for analysing two voice. If you take this approach you should find out the features of the voices first and than you need to know how to compare the features in two spectrograms, it refers to pattern recognition.

This api http://code.google.com/p/musicg-sound-api/ is written in java and can be used in android. It captures the wave spectrogram.



来源:https://stackoverflow.com/questions/4935691/compare-voice-wav-in-android-or-voice-tag-voice-commands-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!