PDA

View Full Version : Remove echo when not using headset!


Mr. Magoo
03-12-2003, 23:52
Ok, here's a challenge to the teamspeak developer :)

On my nokia cell phone(e.g. 6610, 7210, 7250) i can talk to others using the build in speaker, WITHOUT ECHO. I dont talk about the wired handsfree most phones use.

My old panasonic (gd75) phone had the same facility, but there was a MAJOR ECHO at the person i talked to. Because the voice from my phone speaker was send back to the other person I talked to, through the mic.

The voice that comes from the speaker in the nokia phone somehow isnt reflected back as echo


The challenge:

It must be possible to remove the echo that is made when you use voice activated mic, and loudspeakers instead of headset.

I dont know how nokia does this, maybe you could ask them!

The only solution I see to solve this problem, is to remove all the sound that comes out from your speakers, from the sound that is transmitted through the mic.

Like when you face two speakers CLOSE towards eachother and one of the speakers is reversed, no woice is generated.

I know when using headsets this is not a problem, but I like to play my games and stuff with my speakers.

That's all :)

Dummer Sack
04-12-2003, 12:17
Its not so easy with TS.

If you use the free talking system of a phone, the mic/speaker system is well defined. The mic and speaker characteristcs are well known and designed to suppress echos for themself. Also both are quite close together. That also helps.

To implement something that works only halve way decent in any environment is nearly impossible to archive and would cost a fair amount of processing power and also would add quite a bit of lag. Both is not wanted in a gaming environment and since TS is mainly targeted for the gaming comunity I don't see this happen.

If you want to use speakers in game, buy a second sound card. Use one for the headsed and TS and the other one for your speakers.

PS: I have mande the experience that in FPS games enemies are better to localize by sound with hedphones than with speakers.

Mr. Magoo
04-12-2003, 23:10
Nah, maybe its not that easy!

I just thought it would be possible to filter the sound that comes from speakers, so it wouldnt be send along with the mic too. But you are right it might be using some processor time, and i could imagine all the diffrent brands of soundkarts isnt easy to deal with. The distance wouldnt matter if you measure the sound from both speakers and mic at the soundcard level.

I dont know if i explained the idea well enough. Still I think its possible to combine(add) the reverse amplitude from the speaksers signal to the amplitude of the mic signal. But it might be easier to do it in hardware rather than software.

I use ampliefer with headphones input and dont need another soundkart.

God I sound like a geek, but it would really be something i think. :p

Dummer Sack
05-12-2003, 12:12
I think you did not understand me correctly. The reverse amplitude you have to add to the input is not just the reverse output amplitude you send to the speakers. The correct amplitude depends very much on the seaker and microphone characteristics. And also the distance and orientation between speaker and microphone.

Since the caracteristics, distance and orientation are completely unknown and can even change dynamically (if you use a headset mike and turn your head) it would be quite a bit of computing work to deform and delay (where the delay is also unknown, because it depends on the distance between speaker and microphone) the output signal to the correct reverse signal that has to be added to the input.

So it is not that easy as with cellphone free speach systems where all these parameters are known and not changing. Also cellphones are designed in hardware to support free speach. That means that the integrated mike has a characteristics layout so that it will record near to no sound from the direction of the integrated speaker. Also somthing that is not available to TS.

mCn
05-12-2003, 12:44
Sack, i see you got your shit together not only in networking but also in physics. Why don't you just simpy tell Mr. Magoo to grow up, go to school, get a forking life and maybe realize that there's a major difference between a forking cell phone (lol) and a computer system :D

guldi
05-12-2003, 13:12
@mCn

LOL....you would probably wonder what even grown-up (especially from the marketing departemenr) are asking for features where they have no idea how complex they are :D


@Mr. Magoo

I'm sure if you'll pay the development effort (maybe some 1000 $), the TS Team will implement your request.
Echo cancelation is a very complex thing.
Or have patience, maybe it'll get implemented someday....

cjam
06-12-2003, 01:24
One possibility might be to include a speaker attenuation whilst mic is on.

Perhaps a slide bar (attenuation level) to set the level could be added to the TS options panel.

I believe that if sound output is set off when mic is on, the large majority of people dislike the 'feel' of no feedback, so perhaps the default could be set to low/no attenuation, but could be increased if so desired.

Dummer Sack
06-12-2003, 01:49
@mCm: Not making suggestions just because they are complex is not the way to go. All improvements start with an idea. It was a good suggestion.
I just wanted to point out that the realization is more difficult than thought in the first place and so I don't think that we will see it in the near future.
If someone insits on a feature and bugs the developers all the time although he has no clue what he is suggesting, then it is time to start bashing him. But I don't think that this was the case here.

@cjam: Yes a good suggestion. It would be a good compromise between a complex echo chancelation and complete anoying echo.

The only problem I see here is that even a low echo can be anoying for other users. And it may be to problematic for normal users to configure the attenuation level in that way that nearly no echos occure. Mainly because it is difficult to hear the resulting echo in local test mode (Just look how many users don't get their Voice Activation correct).

EDIT: Also a problem is that the attenuation level would have to change if the stereo is turned up more. And this is something that TS has no knowledge about.

PieterV
27-03-2004, 22:56
This echo cancelling thing must be possible in software. Skype somehow manages to do it perfectly. I can call someone with a notebook, using the notebook speakers and microphone and the sound is perfect with Skype. I get terrible echo's if that same person uses Teamspeak.

Don't know how they manage it, but echo cancelling in software it is possible.

papaschtroumpf
29-03-2004, 18:48
Yes echo cancelling is possible but very processor intensive (I have written echo cancellers for telephony channels so I know).

Is there a way to mute the speakers when using the push-to-tlak feature? I know this is not what this discussion really is about but it's a way arounbd the problem: when you push the push-to-talk key, TS would mute the sound coming out of the speakers, so there would be no echo.

I'm sure it's easy to do for TS's own sounds, but I don;t know if it's easy to mute whatever game sound is playing too.

I'm just one of those people that has a great sound system and would love to be able to use it with TS, even if it means using push-to-talk exclusively. What Mr. Magoo asks for is of course the ideal solution but technically very challenging.

potatoface
31-03-2004, 23:43
In theory its possible to simply write a driver that would log the data for sound being sent to the soundcard (game music and effects etc) and simply subtract those frequencies real-time from anything coming in from a microphone, but im not sure anyone would enjoy the CPU overhead involved.

The driver would be able to auto-configure itself by simply sending a predefined series of tones via the speakers and then analyzing how much they have changed from what was sent to the soundcard compared to what comes out the speaker and therefore calculating appropriate disortion / delay ratios.

should be possible to make something to do this with a hardware/ software combination for less cpu thrashing

pbarrette
01-04-2004, 00:08
Hi Potatoface,

That's not a bad idea, but it presents other problems and still doesn't address the dynamic placement issue that D-S was referring to earlier.

First off, if you start trying to work at the driver level, then the TS team is going to have to, essentially, rewrite drivers for every soundcard that they wish to be compatible with TS. Doing this would mean that TS development would take considerably longer and would be restricted to very specific soundcards since even different revisions of the same soundcard can have drastically different driver interfaces.

Secondly, you will still have to deal with the problem of mic/speaker placement. Assuming that the placement of the speakers never changes, even a slight movement or rotation of the mic will completely skew the response that has been calculated from the configuration data.

So your program then needs to analyze the input audio vs. the locally generated output audio vs. the remotely generated output audio in real-time and make assumptions based on frequency response, distortion, and timing-skew models. So you'd still be back to square-one doing very intensive calculations, albeit with much more accurate in/out data because of the direct driver feed.

With a notebook, where the mic/speaker placement is absolutely fixed, it may be a different story. You probably wouldn't even need the driver level audio data to do your initial calibration if you have some reasonably decent test data and analysis happening during the calibration process.

Just my opinion,
pb

papaschtroumpf
07-04-2004, 01:58
There are adptive signal processing techniques to do echoi cancellation over a changing channel but the math involved is pretty intensive, especially for echo in something like a large room.
There is a reason why most speakerphones are not full duplex...