DSPRelated.com
Forums

to calculate time delay between two signals

Started by padma.kancharla October 26, 2011
HI

I am a CS student and new to this field. I am working on source
localisation problem. I do not know matlab. Could you please throw some
light on how to implement the following steps in C language.

1.find the cross correlation between two signals received at two mics
simultaneously. Here the signals refer to speech signals.

2.determine the accurate time delay between them.

Please give me ideas or sources that help me deal with this problem and
that would teach me how to implement them from scratch as I am very new to
this field.

I really need it asap.


Thanks in advance,
Padma

 



padma.kancharla wrote:
> HI > > I am a CS student and new to this field. I am working on source > localisation problem.
Stop here and learn to do simple things first. After 3-4 years of learning proceed to the source localization problem.
> I do not know matlab.
This is actually good for you. Matlab is bad thing.
> Could you please throw some > light on how to implement the following steps in C language.
1. Power on the computer. 2. Implement whatever you want. 3. Power off the computer.
> 1.find the cross correlation between two signals received at two mics > simultaneously. Here the signals refer to speech signals.
The cross correlation will be very much like random.
> 2.determine the accurate time delay between them.
Impossible.
> Please give me ideas or sources that help me deal with this problem and > that would teach me how to implement them from scratch as I am very new to > this field.
"Understanding DSP" by R.J. Lyons.
> > I really need it asap.
Sure. Send money right now. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Oct 26, 9:51&#4294967295;am, "padma.kancharla" <pkanchar@n_o_s_p_a_m.mit.edu>
wrote:
> HI > > I am a CS student and new to this field. I am working on source > localisation problem. I do not know matlab. Could you please throw some > light on how to implement the following steps in C language. > > 1.find the cross correlation between two signals received at two mics > simultaneously. Here the signals refer to speech signals. > > 2.determine the accurate time delay between them. > > Please give me ideas or sources that help me deal with this problem and > that would teach me how to implement them from scratch as I am very new to > this field. > > I really need it asap. > > Thanks in advance, > Padma
Look at U. S. patent 6947551. It shows how to use the AMDF as a correlator to do time delay for speech signals. f course, if you use the AMDF (even for research), you will need to pay the invention assignee. But, there are other ways to do correlation. This, at least, shows you how. And, it's very accurate. Maurice Givens
On Oct 26, 4:24&#4294967295;pm, maury <maury...@core.com> wrote:
> On Oct 26, 9:51&#4294967295;am, "padma.kancharla" <pkanchar@n_o_s_p_a_m.mit.edu> > wrote: > > > > > > > > > > > HI > > > I am a CS student and new to this field. I am working on source > > localisation problem. I do not know matlab. Could you please throw some > > light on how to implement the following steps in C language. > > > 1.find the cross correlation between two signals received at two mics > > simultaneously. Here the signals refer to speech signals. > > > 2.determine the accurate time delay between them. > > > Please give me ideas or sources that help me deal with this problem and > > that would teach me how to implement them from scratch as I am very new to > > this field. > > > I really need it asap. > > > Thanks in advance, > > Padma > > Look at U. S. patent 6947551. It shows how to use the AMDF as a > correlator to do time delay for speech signals. f course, if you use > the AMDF (even for research), you will need to pay the invention > assignee. But, there are other ways to do correlation. This, at least, > shows you how. > > And, it's very accurate. > > Maurice Givens
That seems to contradict what the non- "IDIOT" is saying. I guess you are an anti-non IDIOT.
On Oct 26, 7:48&#4294967295;pm, brent <buleg...@columbus.rr.com> wrote:
> On Oct 26, 4:24&#4294967295;pm, maury <maury...@core.com> wrote: > > > > > > > On Oct 26, 9:51&#4294967295;am, "padma.kancharla" <pkanchar@n_o_s_p_a_m.mit.edu> > > wrote: > > > > HI > > > > I am a CS student and new to this field. I am working on source > > > localisation problem. I do not know matlab. Could you please throw some > > > light on how to implement the following steps in C language. > > > > 1.find the cross correlation between two signals received at two mics > > > simultaneously. Here the signals refer to speech signals. > > > > 2.determine the accurate time delay between them. > > > > Please give me ideas or sources that help me deal with this problem and > > > that would teach me how to implement them from scratch as I am very new to > > > this field. > > > > I really need it asap. > > > > Thanks in advance, > > > Padma > > > Look at U. S. patent 6947551. It shows how to use the AMDF as a > > correlator to do time delay for speech signals. f course, if you use > > the AMDF (even for research), you will need to pay the invention > > assignee. But, there are other ways to do correlation. This, at least, > > shows you how. > > > And, it's very accurate. > > > Maurice Givens > > That seems to contradict what the non- "IDIOT" is saying. &#4294967295;I guess you > are &#4294967295;an anti-non IDIOT.- Hide quoted text - > > - Show quoted text -
Severe PMS can cloud person's mind and turn anybody into stupident :) Everybody and his uncle knows that the standard text-book answer to the OP' question is *generalized cross-correlation* (GCC), which turns into classical cross-correlation when weighting function is chosen to be equal to one. Springer Handbook of Speech Processing, Chapter 51 "Time Delay Estimation and Source Localization" (Page 1045) This works OK if there is no room reverberation. With room reverberation.......
>On Oct 26, 9:51=A0am, "padma.kancharla" <pkanchar@n_o_s_p_a_m.mit.edu> >wrote: >> HI >> >> I am a CS student and new to this field. I am working on source >> localisation problem. I do not know matlab. Could you please throw some >> light on how to implement the following steps in C language. >> >> 1.find the cross correlation between two signals received at two mics >> simultaneously. Here the signals refer to speech signals. >> >> 2.determine the accurate time delay between them. >> >> Please give me ideas or sources that help me deal with this problem and >> that would teach me how to implement them from scratch as I am very new
t=
>o >> this field. >> >> I really need it asap. >> >> Thanks in advance, >> Padma > >Look at U. S. patent 6947551. It shows how to use the AMDF as a >correlator to do time delay for speech signals. f course, if you use >the AMDF (even for research), you will need to pay the invention >assignee. But, there are other ways to do correlation. This, at least, >shows you how. > >And, it's very accurate. > >Maurice Givens
Isn't that only going to work well for clean signals from the source? The OP said these are signals from two mics, so they are going to have a lot of reverb mixed in, and the reverb will be quite different at each mic. As Vlad said, the cross correlation might look near to random. Steve
On Oct 27, 3:51&#4294967295;am, "padma.kancharla" <pkanchar@n_o_s_p_a_m.mit.edu>
wrote:
> HI > > I am a CS student and new to this field. I am working on source > localisation problem. I do not know matlab. Could you please throw some > light on how to implement the following steps in C language. > > 1.find the cross correlation between two signals received at two mics > simultaneously. Here the signals refer to speech signals. > > 2.determine the accurate time delay between them. > > Please give me ideas or sources that help me deal with this problem and > that would teach me how to implement them from scratch as I am very new to > this field. > > I really need it asap. > > Thanks in advance, > Padma
You need the Generalized Cross Correlation method.(there are many varients - eg Hanan Thomson, SCOT,PHAT) This works up to a point as I have tried it in a real environment. Ordinary cross correlation is no good. Hardy
On Oct 27, 5:15&#4294967295;pm, "steveu" <steveu@n_o_s_p_a_m.coppice.org> wrote:
> >On Oct 26, 9:51=A0am, "padma.kancharla" <pkanchar@n_o_s_p_a_m.mit.edu> > >wrote: > >> HI > > >> I am a CS student and new to this field. I am working on source > >> localisation problem. I do not know matlab. Could you please throw some > >> light on how to implement the following steps in C language. > > >> 1.find the cross correlation between two signals received at two mics > >> simultaneously. Here the signals refer to speech signals. > > >> 2.determine the accurate time delay between them. > > >> Please give me ideas or sources that help me deal with this problem and > >> that would teach me how to implement them from scratch as I am very new > t= > >o > >> this field. > > >> I really need it asap. > > >> Thanks in advance, > >> Padma > > >Look at U. S. patent 6947551. It shows how to use the AMDF as a > >correlator to do time delay for speech signals. f course, if you use > >the AMDF (even for research), you will need to pay the invention > >assignee. But, there are other ways to do correlation. This, at least, > >shows you how. > > >And, it's very accurate. > > >Maurice Givens > > Isn't that only going to work well for clean signals from the source? The > OP said these are signals from two mics, so they are going to have a lot of > reverb mixed in, and the reverb will be quite different at each mic. As > Vlad said, the cross correlation might look near to random. > > Steve
It won't. It will have a maximum at the principle component of the delay. Vlad is talking out of his fangs once again. Hardy
http://www.dsprelated.com/showarticle/26.php
http://www.dsprelated.com/showcode/207.php

On Oct 26, 9:38&#4294967295;pm, fatalist <simfid...@gmail.com> wrote:
> On Oct 26, 7:48&#4294967295;pm, brent <buleg...@columbus.rr.com> wrote: > > > > > > > On Oct 26, 4:24&#4294967295;pm, maury <maury...@core.com> wrote: > > > > On Oct 26, 9:51&#4294967295;am, "padma.kancharla" <pkanchar@n_o_s_p_a_m.mit.edu> > > > wrote: > > > > > HI > > > > > I am a CS student and new to this field. I am working on source > > > > localisation problem. I do not know matlab. Could you please throw some > > > > light on how to implement the following steps in C language. > > > > > 1.find the cross correlation between two signals received at two mics > > > > simultaneously. Here the signals refer to speech signals. > > > > > 2.determine the accurate time delay between them. > > > > > Please give me ideas or sources that help me deal with this problem and > > > > that would teach me how to implement them from scratch as I am very new to > > > > this field. > > > > > I really need it asap. > > > > > Thanks in advance, > > > > Padma > > > > Look at U. S. patent 6947551. It shows how to use the AMDF as a > > > correlator to do time delay for speech signals. f course, if you use > > > the AMDF (even for research), you will need to pay the invention > > > assignee. But, there are other ways to do correlation. This, at least, > > > shows you how. > > > > And, it's very accurate. > > > > Maurice Givens > > > That seems to contradict what the non- "IDIOT" is saying. &#4294967295;I guess you > > are &#4294967295;an anti-non IDIOT.- Hide quoted text - > > > - Show quoted text - > > Severe PMS can cloud person's mind and turn anybody into stupident :) > > Everybody and his uncle knows that the standard text-book answer to > the OP' question is > *generalized cross-correlation* (GCC), which turns into classical > cross-correlation when weighting function is chosen to be equal to > one. > > Springer Handbook of Speech Processing, Chapter 51 "Time Delay > Estimation and Source Localization" (Page 1045) > > This works OK if there is no room reverberation. > > With room reverberation.......- Hide quoted text - > > - Show quoted text -
Doing a correlation on a speech signal will, in general, give you the pitch period of the voiced portion, not the delay of the speech. If you're going to use correlation, you need the envelope (or something similar). Maurice Givens