Forums

Echo Cancellation on PC platform

Started by qfu72 August 5, 2005
The sound card can play/record only at a certain sample rate, usually it is 
48khz. When you want to play a wav file at 8khz it has to internally 
upsample your 8khz data to 48khz in it's dsp and play it at 48khz.
When you want to record at 8khz the sound card samples your microphone at 
48khz and downsamples to 8khz.
Some sound cards don't do it accuratly and that is why you have a mismatch.



"Jon Harris" <jon99_harris7@hotmail.com> wrote in message 
news:oQZIe.1406$2j.784@trnddc07...
> "Yehuda Mittelman" <liayehud@netvision.net.il> wrote in message > news:dd05t8$cml$1@news2.netvision.net.il... >> You will have two problems: >> >> 2) some sound cards can only play the audio at 48khz. when such a >> soundcard has to >> play at 8000hz and record at 8000hz it's dsp uses a >> downsampling/upsampling >> algorithm. >> therefor you will see that you actually play the audio at 8000hz and >> record it at 8005hz or 8010hz or.... who knows... >> so you will have to detect that and convert your near_end or far_end >> samples >> accordingly. > > I've heard this before, but never really understood why this is the case. > Can you explain? Is the problem that the OS isn't locked to the sample > rate on the audio card? >
"qfu72" <qiangfu72@gmail.com> schrieb im Newsbeitrag
news:wbydnZ2dnZ1aPCjVnZ2dnXPWbt-dnZ2dRVn-y52dnZ0@giganews.com...
> we want to implement an acoustic echo canceller on a windows PC platform > for chatting tools like MSN/skype. > > A serious problem we found in this kind of platform is the time delay > (sound card play+speaker+air+mic.+ sound card record) between Ref. signal > and Echo signal is not consist in every session 1)how could we esimate > the time dealy? ...
Don't know if it's very advanced, but why not generate a little burst and do a correlation with incoming signal. So you would know the delay time and you may get useful IRs for the future processing.
Well, if you have to do sampling rate conversion anyway, then why not 
simply doing the sampling rate conversion between 8<->48kHz by yourself 
and running your sound card at 48kHz.... (while all your processing are 
still at 8kHz)  then you completely eliminate the second  problem!

Isn't that much simpler and makes more sens Mr. Mittelman ?


Yehuda Mittelman wrote:
> The sound card can play/record only at a certain sample rate, usually it is > 48khz. When you want to play a wav file at 8khz it has to internally > upsample your 8khz data to 48khz in it's dsp and play it at 48khz. > When you want to record at 8khz the sound card samples your microphone at > 48khz and downsamples to 8khz. > Some sound cards don't do it accuratly and that is why you have a mismatch. > > > > "Jon Harris" <jon99_harris7@hotmail.com> wrote in message > news:oQZIe.1406$2j.784@trnddc07... > >>"Yehuda Mittelman" <liayehud@netvision.net.il> wrote in message >>news:dd05t8$cml$1@news2.netvision.net.il... >> >>>You will have two problems: >>> >>>2) some sound cards can only play the audio at 48khz. when such a >>>soundcard has to >>> play at 8000hz and record at 8000hz it's dsp uses a >>>downsampling/upsampling >>> algorithm. >>> therefor you will see that you actually play the audio at 8000hz and >>>record it at 8005hz or 8010hz or.... who knows... >>> so you will have to detect that and convert your near_end or far_end >>>samples >>> accordingly. >> >>I've heard this before, but never really understood why this is the case. >>Can you explain? Is the problem that the OS isn't locked to the sample >>rate on the audio card? >> > > >
It still seems strange that the soundcard, which is doing the 
upsampling/downsampling in each case, would use a different rate for each.  I'm 
not familiar with the architecture of PC audio hardware, but it seems like it 
would be harder to make it asynchronous then if playback and record used the 
same clock.  Is the 48kHz the exact same 48kHz for both playback and record? 
Thanks for your info!

-- 
Jon Harris
SPAM blocker in place:
Remove 99 (but leave 7) to reply

"Yehuda Mittelman" <liayehud@netvision.net.il> wrote in message 
news:dd22e7$ob$1@news2.netvision.net.il...
> The sound card can play/record only at a certain sample rate, usually it is > 48khz. When you want to play a wav file at 8khz it has to internally upsample > your 8khz data to 48khz in it's dsp and play it at 48khz. > When you want to record at 8khz the sound card samples your microphone at > 48khz and downsamples to 8khz. > Some sound cards don't do it accuratly and that is why you have a mismatch. > > > > "Jon Harris" <jon99_harris7@hotmail.com> wrote in message > news:oQZIe.1406$2j.784@trnddc07... >> "Yehuda Mittelman" <liayehud@netvision.net.il> wrote in message >> news:dd05t8$cml$1@news2.netvision.net.il... >>> You will have two problems: >>> >>> 2) some sound cards can only play the audio at 48khz. when such a soundcard >>> has to >>> play at 8000hz and record at 8000hz it's dsp uses a >>> downsampling/upsampling >>> algorithm. >>> therefor you will see that you actually play the audio at 8000hz and >>> record it at 8005hz or 8010hz or.... who knows... >>> so you will have to detect that and convert your near_end or far_end >>> samples >>> accordingly. >> >> I've heard this before, but never really understood why this is the case. Can >> you explain? Is the problem that the OS isn't locked to the sample rate on >> the audio card? >> > >