Closed deermichel closed 3 years ago
It looks like there are two levels of audio processing, one done at the audio driver level and another done at webrtc. By doing a custom audio driver you can control the first one (Echo cancelation and AGC at capturing level). For now, there is no way to configure the second part (webrtc).
We will take a look, but I wonder if you can you provide a small sample app (just to make sure we are testing the right thing)?
I will close this for now. Feel free to reopen with more details.
Hey @igorwojda, sorry for answering so late... I'm quite busy right now. I'll come back to this issue as soon as I can provide you an example app (most likely the Android Custom Audio Driver sample with the adjustmentments mentioned above).
But I was wondering where you got the information about the two levels of audio processing (on native level & in webrtc)? I thought all the audio capturing and networking stuff is done in Java? If not, is there a way to intervene on WebRTC level? Thank you :)
In our app, we try to stream high-res audio from an audio interface that is directly connected to the phone. Therefore, we need to disable all automatically applied voice/videoconference input preprocessing. On iOS this can simply be achieved by setting an appropriate category & mode for the
AVAudioSession
. However, on Android we're unable to get the same high-res audio quality as on iOS. We tried out different audio recording apps to confirm that the interface itself is capable of delivering high-res audio on Android (which is the case).Things we tried so far (on a Samsung Galaxy S20 & a LG G7, both running Android 10) - using the AdvancedAudioDriver sample as a starting point:
AudioSource.UNPROCESSED
/.VOICE_RECOGNITION
/.MIC
as input for theAudioRecord
instancenoiseSuppressor.setEnabled(false)
,echoCanceler.setEnabled(false)
AutomaticGainControl
instance if available and disable itAudioManager.STREAM_MUSIC
stream for playback instead of VOICE_CALLThere's definitely a noticeable improvement compared to using the default audio driver, but still the audio is not as clear (high frequencies are missing, sounds really compressed - even at a bitrate > 128k) as delivered by the interface / on iOS. I suspect that there's still some processing going on in the background that cannot be disabled by the above measures. Did someone encounter the same problem before - or does the Android OpenTok framework offer a lower quality than the iOS version in general?