簡體   English   中英

在進行音頻會話錄音時如何減少錄音噪音?

[英]How to reduce recording noise when recording with audio sessions?

我可以使用一些錄制代碼,但是錄制的音頻(來自iPod touch內部麥克風) 非常嘈雜。

這是我的配置:

    AVAudioSession *audioSession = [AVAudioSession sharedInstance];
    NSError *err = nil;
    [audioSession setCategory:AVAudioSessionCategoryPlayAndRecord error:&err];
    if (err) {
        NSLog(@"audioSession: %@ %d %@", [err domain], [err code], [[err userInfo] description]);
        return;
    }
    [audioSession setActive:YES error:&err];
    err = nil;
    if (err) {
        NSLog(@"audioSession: %@ %d %@", [err domain], [err code], [[err userInfo] description]);
        return;
    }

    recordSetting = [[NSMutableDictionary alloc] init];

    // We can use kAudioFormatAppleIMA4 (4:1 compression) or kAudioFormatLinearPCM for nocompression
    [recordSetting setValue:[NSNumber kAudioFormatLinearPCM] forKey:AVFormatIDKey];

    // We can use 44100, 32000, 24000, 16000 or 12000 depending on sound quality
    [recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey];

    // We can use 2 (if using additional h/w) or 1 (iPhone only has one microphone)
    [recordSetting setValue:[NSNumber numberWithInt:1] forKey:AVNumberOfChannelsKey];

    // These settings are used if we are using kAudioFormatLinearPCM format
    [recordSetting setValue:[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
    [recordSetting setValue:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
    [recordSetting setValue:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];

我的配置不好嗎?還是有其他方法可以減少錄制音頻中的噪音? 據我所知,那里有一些錄音機應用程序無噪音。

為此,您必須進行一些數字信號處理。 當麥克風沒有任何聲音時,您將必須對所聽到的噪聲進行表征。 換句話說,您將必須指定正在記錄或拾取的白噪聲。 您將使用數字聲音處理(DSP)進行所有這些表征。 然后,您可以錄制音頻並減去之前表征的白噪聲。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM