Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xiaomi Note 4 (mido): InputType.VoiceRecognition does not disable noise suppression #911

Open
rpattabi opened this issue Jun 25, 2020 · 2 comments
Assignees
Labels
bug input_preset Bugs related to input presets P1 high priority Xiaomi

Comments

@rpattabi
Copy link
Contributor

Android version(s): 7.0
Android device(s): Xiaomi Note 4 (mido)
Oboe version: current master (f644b60)
App name used for testing: OboeTester

Short description
As per Android CDD, capturing audio using VoiceRecognition profile (for oboe it is InputType.VoiceRecognition) must disable noise reduction audio processing. However, on Xiaomi Note 4 the recorded sound is distorted which is apparently processed with noise reduction. We checked other devices such as Nokia 3.1 Plus, Nokia 5.1 Plus, Moto G3, and Moto G4 and found they adhere to Android CDD w.r.t this preset.

Steps to reproduce

  1. Open OboeTester on Xiaomi Note 4 (device1)
  2. Tap RECORD AND PLAY
  3. InPreset to VoiceRec
  4. On another device (device2): Open OboeTester. TEST OUTPUT. OPEN then START to play test tone.
  5. On device1: Tap RECORD, after sometime STOP and PLAY

Expected behavior
No noise suppression. Playback should contain continuous test tone as played by device2.

Actual behavior
Noise suppressed output. As the result, the tone plays only for couple of seconds and becomes silent.

Any additional context
Similar scenario produces expected behavior on Nokia and Motorola devices mentioned in the description.

I understand this may not be a oboe bug but a device specific quirk. However, I think oboe is meant to tackle such device specific audio issues so that app developers can focus on their app functionality.

Xiaomi is the largest smartphone seller in India. So it is critical for us that oboe pays close attention to Xiaomi devices.

Attached Xiaomi Note 4 recording with Input Type VoiceRecognition: https://clyp.it/xg3g5yrm

@rpattabi rpattabi added the bug label Jun 25, 2020
@philburk philburk self-assigned this Jun 27, 2020
@philburk philburk added the P1 high priority label Jun 27, 2020
@philburk
Copy link
Collaborator

Thanks for the bug report and the recording. It is truncated and also very distorted.

I understand this may not be a oboe bug but a device specific quirk.

True. So we will work with Xiaomi on this.

However, I think oboe is meant to tackle such device specific audio issues so that app
developers can focus on their app functionality.

We can work around some things but not everything. Is there an InputPreset that we can use instead of VoiceRec that does not have this problem? if so then we can coerce the InputPreset.

@rpattabi
Copy link
Contributor Author

Is there an InputPreset that we can use instead of VoiceRec that does not have this problem? if so then we can coerce the InputPreset.

There is InputPreset.Unprocessed. But the problem with that is, the input level is way too low. It has to be boosted. But the recording level with Unprocessed input preset varies across device models. It is difficult for app to boost the volume as we don't know how microphone is calibrated.

I'm glad to know that Oboe team can work with Xiaomi. I hope you can learn about the device models which deviate from CDD for audio input presets and use that to apply workarounds for all these device models. When VoiceRec preset is requested on Xiaomi Note 4, for example, Oboe can capture Unprocessed input and amplify to adhere to the level recommended in CDD:

SHOULD record the voice recognition audio stream with input sensitivity set such that a 90 dB sound power level (SPL) source at 1000 Hz yields RMS of 2500 for 16-bit samples.

To find the correct amplification factor, Xiaomi shall provide microphone sensitivity and configuration used in Unprocessed input preset.

I also think that Oboe can reuse this stuff for other devices with non-standard behavior for any input preset, as and when such issues are identified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug input_preset Bugs related to input presets P1 high priority Xiaomi
Projects
None yet
Development

No branches or pull requests

2 participants