开发者

Software sound cancelling (destructive interference) tools on Linux? [closed]

开发者 https://www.devze.com 2023-02-08 16:57 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. 开发者_JAVA技巧

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 4 years ago.

Improve this question

I am looking at writing some software that will allow me to listen to music whilst talking with someone on skype. The problem is that if you do this with speakers the music also gets transferred to the other user, which is what I want to avoid.

So I was thinking about writing something that will, by listening to the output of my music application, cancel out those sounds from the microphone input sent to skype.

I have searched Google a bit, but maybe someone here can kickstart this project with some pointers/ideas/etc...

EDIT: has anybody used JACK before?


What you want to do is basically the same as Echo cancellation in telephony.

http://www.voip-info.org/wiki/view/Asterisk+echo+cancellation is simple introduction. Also have a look at the pages for the mark and mark2 echo canceller there and the mentioned TI application note.

Also this site: http://www.embeddedstar.com/articles/2003/7/article20030720-1.html explains the mechanics quite well.

You'll have to intercept both the music player's output and the microphone input, and then pass the samples via some sort of IPC into your DSP process. JACK actually does this, but setting things up (e.g. ALSA->JACK bridge, if your music player and/or Skype does not natively support JACK as sound interface) does require some skill.

I guess it could work fairly well, but it probably requires quite some CPU. Especially XRUNS (audio buffer under- or overrun) can be really bad for your echo canceller, i.e. you might need realtime linux kernel patches. Implementation is not trivial, either. Also having stereo sound from your music player will reduce your cancellation success.

HTH


Generally when it comes to noise cancellation, it is due to 2 things in precedence order:

  1. Hardware - either a MIC/headphone with noise cancellation feature or the internal sound card MIC that already built in that feature.

  2. Software - a good example is Skype, AFAIK SKype allow you to fine tuning audio quality but unfortunately the tuning part so far only existed in Windows platform. Where in Linux, you can choose the option of "Allow Skype To Automatcally Adjust My Mixer Levels" checkbox at Preference > Sound Devices.

My understanding is when it come to noise cancellation, you have to deal with the sound car driver programming, currently there is couple of noises noted into future Ubuntu software release that carry the said feature, there is here mentioned.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号