embedding sound problem
embedding sound problem
- Subject: embedding sound problem
- From: "Edwards, Waverly" <email@hidden>
- Date: Sat, 3 Jul 2010 05:38:11 -0500
- Acceptlanguage: en-US
- Thread-topic: embedding sound problem
Hello,
I have been working towards embedding/mixing one waveform into another with the end goal of having the carrier be a white noise or music source. The embedded source (speech) amplitude must between -15 to -25 db of the carrier source. Here is the question. What would the best way be to establish this range using an algorithm? I have been trying for days to think of a way that would work.
The only reasonable solution I can think of is to pass through the entire white noise sample obtaining an average magnitude. I would then do the same for the spoken sample samples. Once I’ve obtain the average of both sample sets, I would then reduce the spoken sample by a percentage so the average does not exceed the value: 10 ^ ( dbLimit /20 ). That seems like a reasonable way to go but if I were using music, during quiet passages the speech would be obvious. I am also concerned there may be too much reduction and there will be a loss of intelligence. May I ask, what you would suggest as a way of achieving this goal?
Ultimately I would like to perform this in realtime but the above described method could only be achieved offline because it requires an average of the squares of the magnitude over the entire sample of both the carrier and embedded source. Maybe I could use a small moving "window" of samples to get the average of squares. I didn't think my goal was going to be a challenge but the more thought I've put into this, the more complex it appears to be. I don't know if the end result would end up being some sort of dynamic automatic gain control, ducking in reverse. All suggestions are welcome.
Thank you for your time,
W. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden