• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Removing noise wheh mic attached to Stream on Media server

New Here ,
Nov 29, 2011 Nov 29, 2011

Copy link to clipboard

Copied

I am using these settings for media server but there's too much noise when a mic is attached to stream. Code is as following, can you suggest changes to remove the noise for more crystal clear voice?

public function initMicrophone():void
{
    mic
= getMicrophone();

   
if (mic == null)
   
{
        trace
("No available microphone");
   
}
   
else
   
{
        mic
.setLoopBack(false);
        mic
.setSilenceLevel(10, 20000);
        mic
.gain = 60;
        mic
.addEventListener(ActivityEvent.ACTIVITY, micActivityHandler);
        mic
.addEventListener(StatusEvent.STATUS, micStatusHandler);

        mic
.codec = SoundCodec.PCMU;

   
//mic.codec = "Speex";
   
//mic.encodeQuality = 10;
   
//mic.framesPerPacket = 2;

   
}
}

private function getMicrophone():Microphone
{
   
var mic:Microphone = Microphone.getEnhancedMicrophone();
   
var options:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();
    options
.mode = MicrophoneEnhancedMode.FULL_DUPLEX;
    options
.nonLinearProcessing = true;
    mic
.enhancedOptions = options;

   
return mic;
}

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 05, 2011 Dec 05, 2011

Copy link to clipboard

Copied

Have you done the problem?can you send some data for this to me?33845916@qq.com

I have the same problem, it is very bad quality。

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Dec 13, 2011 Dec 13, 2011

Copy link to clipboard

Copied

LATEST

Hi,

You can try the following :

Codec can be set to Speex, I guess that's a better option.

mic.echopath = 128

mic.NoiseSuppresion = true

mic.speakerGain = 100 / autogain = false (please check the documentation for the correct method).

mic.setQuality = best

mic.framesPerPacket = 1;

mic.setSilenceLevel(0, mic.silenceTimeout)

mic.automode = false

Let us know if they are useful. Thank you !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines