Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
189 views
in Technique[技术] by (71.8m points)

ios - Simplest algorithm of measuring how similar of two short audio

The question is to look for any open source or simple implementation to measure how similar between two audios on the iOS application.

Simply speaking, audio can be represented by 1-D vector, to calculate the distance between the 1D vector. But the audio length will be different, therefore need some pre-processing etc.

Looking forward to get some clues here, thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The similarity between two sequences of variable length can be efficiently calculated with DTW:

http://en.wikipedia.org/wiki/Dynamic_time_warping

This algorithm is simple to implement yourself and there are quite many existing implementations linked on the wiki page.

Simply speaking, audio can represented by 1-D vector,

It's reasonable to split the audio on frames and turn it into 2-D vector of features where for each frame you have an array of values(features) corresponding to the different frequency bands. If you want to deal with music, an FFT for every frame is a good idea, for speech, it's better to calculate mel-frequency cepstrum

Again, you can use many existing libraries for mel frequency features, one of them is a speech recognition toolkit CMUSphinx


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...