25 May '13 - 22:35 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: operations on signals (subtraction)  (Read 455 times)
Zingaro2002
Posts: 3


« on: 10 Aug '12 - 17:46 »
Reply with quoteQuote

Hi everybody,
this is my first post here.
I am new with BASS.net and Bass so I apologize if my question is too silly for you.
----------------------------------
My application will receive two network-streamed mp3 coming from two different network microphones positioned in the same room.
The first mp3 stream (let's say A) will receive some human voices AND background noise.
The second mp3 stream (let's say B) will receive ONLY the background noise (the SAME NOISE of stream A).

What I want to do is generate a new mp3 that is the 'subtraction'
stream A - stream B
that will contain (I hope) only voices.
----------------------------------

Let's suppose, for simplicity's sake, that both mp3 streams are synchronized and are with same sample rate and resolution (44100 and 32bit).

How can I create the 'clean' stream?

I think I have to:

- decode both mp3s to their PCM values
(I have seen this  http://www.un4seen.com/forum/?topic=10290.0;hl=pcm)

- make subtraction operation in corresponding PCM values

- re-encode the results in mp3
------------

Is it right?
Is there a more simple/more efficient way to do the subtraction of two audio signals?
Maybe DSP? How?

Thanks for any advice
Tomorrow I'll go on holiday so I will try your suggestions when I come back at work (August 27h) but I will read this forum anyway.
THANKS for any idea.
Logged
Ian @ un4seen
Administrator
Posts: 15276


« Reply #1 on: 27 Aug '12 - 13:42 »
Reply with quoteQuote

I guess the aim is to remove the background noise from the voice recording. If the noise is identical and perfectly in sync in both recordings, then simply subtracting the noise PCM data from the voice PCM data could work, but I think that is unlikely to be the case as the noise is bound to be slightly different in each recording, eg. due to the different microphone locations. The MP3 encoding would also affect things, as it modifies the sample data (it isn't lossless).

I think noise removal would generally be done in the frequency domain instead (eg. using FFT). For example, get the level of the noise broken down into frequency bands (eg. FFT bins), and then use that as a threshold on the voice recording, eg. silence any bands that don't exceed the threshold.
Logged
Zingaro2002
Posts: 3


« Reply #2 on: 4 Sep '12 - 11:30 »
Reply with quoteQuote

Thank you!
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines