首页 > 解决方案 > Android 开发人员:三星 Galaxy S6 上的录音本底噪声很高

问题描述

我正在构建一个应用程序来分析语音质量。用户制作了一个录音,该录音存储在设备上,然后发送到服务器进行分析。

我最近注意到三星 Galaxy S6 (G920-F)的所有录音都比其他经过测试的 Android 设备噪音大得多。我需要支持 Galaxy S6,因为我在这款手机上有很多用户。

我试图解决这个问题,我尝试使用不同的音频源测试MediaRecorder,例如:DEFAULT、MIC、VOICE_RECOGNITION 和 VOICE_COMMUNICATION。这些选项都不会对噪声产生重大影响。

然后,我使用带有上面列出的相同 AudioSources 的AudioRecorder进行了测试。没提升。

最后,我尝试在 AudioRecorder 中添加一个NoiseSuppressor,但几乎没有改善。

我正在设置 AudioRecorder 和 NoiseSuppressor,如下所示:

public void startRecording(String fileNameIn) {
        bufferSize = AudioRecord.getMinBufferSize (
                RECORDER_SAMPLERATE,
                RECORDER_CHANNELS,
                RECORDER_AUDIO_ENCODING);
        aRecorder = new AudioRecord(
                MediaRecorder.AudioSource.VOICE_RECOGNITION,
                RECORDER_SAMPLERATE,
                RECORDER_CHANNELS,
                RECORDER_AUDIO_ENCODING,
                bufferSize);

        int audioSession = aRecorder.getAudioSessionId();
        enableNoiseSuppressor(audioSession);


        aRecorder.startRecording();
        ......

public void enableNoiseSuppressor(int microphoneId) {
        if (NoiseSuppressor.isAvailable() && noiseSuppressor == null) {
            noiseSuppressor = NoiseSuppressor.create(microphoneId);
            noiseSuppressor.setEnabled(true);
            Log.i(TAG, "NoiseSuppressor enabled");
        } else {
            Log.e(TAG, "This device don't support NoiseSuppressor");
        }
    }

我还在Galaxy S6上测试了第 3 方录音应用程序,并注意到这些录音的噪音水平也很高。对于旗舰(几年前)手机来说,这似乎是一个奇怪的问题。我是否缺少任何 Android 技巧或核心概念?

寻找任何建议或意见。

标签: androidaudio-recordingsamsung-mobilenoise-reduction

解决方案


推荐阅读