2
$\begingroup$

I am in a intention of Porting Voice Activity Detection algorithm in real time hardware,so i was successful in classifying speech and silence/noise but now the problem is replacement of silence frames with comfort noise(preferebly any stationary noise)

so can any one suggest any opensource CNG algorithms or how a comfort noise can be of any type(pink,white etc)

to do this usually we use a rand() functions but where as these type of functions are not available with real time DSP so how to port such type of Algorithms?

$\endgroup$
  • 1
    $\begingroup$ I would probably implement some white noise generator first (is there no PRNG provided for your DSP, that function seems rather standard) and then use a filter to obtain the desired colored noise. The random numbers don't need to be particularly good since it's not used for crypto. The cycle should probably just be long enough so that the noise doesn't loop noticably. $\endgroup$ – jan Sep 19 '13 at 14:08
  • 1
    $\begingroup$ In addition to jan's good points above, another approach that you could use if you don't have the horsepower to generate the noise in real time would be to pregenerate a noise sample with the characteristics that you want and store it in your processor's memory. You could then just loop the noise samples out when needed. As he said, you'll want to make the sample long enough so that it's not obvious that you're just repeating the sample over and over. $\endgroup$ – Jason R Sep 19 '13 at 14:31
  • $\begingroup$ @jan,@Jason R Instead i am looking for a DTX to generate CNG at decoder side to save the bandwidth but usually CNG is for human perception,the CN to be inserted should also depend on the actual noise in actual speech frames isn't it ? how it will be any suggestions $\endgroup$ – kakeh Sep 22 '13 at 10:23
2
$\begingroup$

You may want to try a two-pronged approach. First, have a standard pre-packaged CN to inject (like jan and Jason R suggest) at the start of the conversation/exchange.

As the conversation progresses, gather low-volume data, perhaps as part of your noise reduction algorithm I assume you already have, by sampling the lowest volume signal coming in between VAD end and start points. Compare your low-volume samples to your standard CN, and replace (or convolve to simply dilute your synthetic CN) if it matches some threshold or characteristic you established. All you need is some rand and normalization functions, and perhaps FFT, all of which are readily available in C (and assembly).

$\endgroup$
  • $\begingroup$ my frame size is 20ms so if i take a pre-calculated CN of 20ms up on writing it continously it sound very annoying i also tried for taking the last 20ms frame of last speech frame and reusing it for Comfort noise these two did not help any other effective CNG $\endgroup$ – kakeh Sep 30 '13 at 10:34
  • $\begingroup$ I don't think you'll want to use only one frame. Assuming this is for a conversation, you'll want to simulate the fact that the noise is nearly continuous and evolving. Don't start the noise at the same spot each time. It's just a seek and play in your CN data, but you can play and "pause" at each VAD rather than replaying one frame at the end of each one. $\endgroup$ – wwwslinger Oct 1 '13 at 6:43
  • $\begingroup$ In general, pauses are < 5 sec before speech resumes, so a bank of 5 seconds should be plenty. Your methods for detecting the start and end should be different as well. The end could be predicted such that you start the noise early so the transition isn't abrupt. You could also randomly reset the seek every 3 VADs to make the replay less obvious and more natural, and resample frames within it as you get new lower-volume samples. It isn't a trivial task to do this well, as you know. $\endgroup$ – wwwslinger Oct 1 '13 at 6:44
-1
$\begingroup$

Here to my question i have gone for a simple solution as suggested by some people above and also with my idea i stayed simple with the approach

on the decoder side i have taken two types comfort noise with different noise strengths,while streaming the decoded data if the user finds distrubing with one noise strength i will switch to the other noise

i have got the noise files of 1 second up on which repetition will also doesn't bother a human ear

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.