Subject:Re: Audio Time and/or Level Alignment AlgorithmFrom:Dan Stowell <dan.stowell@xxxxxxxx>Date:Thu, 3 Jul 2008 12:36:20 +0100List-Archive:<http://lists.mcgill.ca/scripts/wa.exe?LIST=AUDITORY>Hi - I don't have any source code for you, I'm afraid. But if you take the envelopes of the two signals, then for each of your candidate time-delays you have a set of 2D data points (use the same number of points for each time-delay). There are various ways to estimate the mutual information from that, then you just look for the time-delay giving the largest mutual information. The quick and dirty way to get a MI value is to calculate a 2D histogram and the two corresponding 1D histograms (representing the marginals of the 2D histogram) and calculate the mutual information from the entropies of those 3 distributions (I(X;Y) = H(X) + H(Y) - H(X,Y)). This is a rough approach but easy and quick. There are various tweaks you could add such as adaptive bin widths etc. There are more accurate approaches. One is: Estimation of the information by an adaptive partitioning of the observation space Darbellay and Vajda (1999) http://dx.doi.org/10.1109/18.761290 I'm not much of a vision person but I believe MI is used for image alignment fairly often - a very similar task. It's discusse in this paper (which also describes another approach to the estimation, using Nearest-Neighbours): High-Dimensional Entropy Estimation for Finite Accuracy Data: R-NN Entropy Estimator Kybic (2007) http://dx.doi.org/10.1007/978-3-540-73273-0_47 HTH Dan Dermot Campbell wrote: > Hi Dan, > > Im also interested in this. > > Do you have any more information on what you proposed or even source code? > > Thanks, > Dermot. > > > ------------------------------------------------ > Dermot Martin Campbell, > Postgraduate Research Student, > Dept. of Electronic Eng., > National University of Ireland, > Galway City. > Tel:(091) 493031 > Email: Dermot.Campbell@xxxxxxxx > > > >> Hi - >> >> You might like to consider using mutual information as an alternative to >> cross-correlation. The advantage is that cross-correlation is always >> about the linear dependencies between the signals, whereas the mutual >> information can also highlight nonlinear dependencies (for example, in >> your case, the codec may have added compression). >> >> Dan >> >> >> >> Junyong You wrote: >>> Hi John and all, >>> >>> In fact, I am also looking for the time alignment of two samples, one is >>> the original, and another is decoded. My problem is to estimate the time >>> delay caused by audio coding. >>> >>> I try a classifical estimation method, which makes use of envelope based >>> cross-correlation function. That means, the envelopes of two samples are >>> computed firstly, and then calculate the cross correlation function of >>> these two envelopes, and then select the time length corresponding to >>> the maximal correlation as the delay. >>> >>> I hope this method will help you, and if anyone has better approaches, >>> please let me know, thank you very much. >>> >>> BR, Junyong You >>> >>> TUT, Finland >>> ----- Original Message ----- >>> From: John Spencer >>> To: AUDITORY@xxxxxxxx >>> Sent: Wednesday, July 02, 2008 2:11 PM >>> Subject: [AUDITORY] Audio Time and/or Level Alignment Algorithm >>> >>> >>> >>> Hello List, >>> >>> >>> >>> I am looking for advice and help with a problem. >>> >>> >>> >>> I have 2 audio signals each recorded in different environments but >>> both are the same length. I need to align them the best I can or align >>> at leats one of them to match the other. They need to be aligned time >>> wise and level wise if possible. Any advice appreciated, thanks. >>> >>> >>> >>> John Spencer >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> Walla! Mail - Get your free unlimited mail today >> >> -- >> Dan Stowell >> Centre for Digital Music >> Queen Mary, University of London >> Mile End Road, London E1 4NS >> http://www.elec.qmul.ac.uk/department/staff/research/dans.htm >> http://www.mcld.co.uk/ >> > > -- Dan Stowell Centre for Digital Music Queen Mary, University of London Mile End Road, London E1 4NS http://www.elec.qmul.ac.uk/department/staff/research/dans.htm http://www.mcld.co.uk/

This message came from the mail archive

http://www.auditory.org/postings/2008/

maintained by: DAn Ellis <dpwe@ee.columbia.edu>

Electrical Engineering Dept., Columbia University