google / oboe

Oboe is a C++ library that makes it easy to build high-performance audio apps on Android.
Apache License 2.0
3.68k stars 563 forks source link

OboeTester needs a way to measure latency when AEC is active #2090

Open philburk opened 1 month ago

philburk commented 1 month ago

When measuring latency with VoiceComm active the device often adds an AEC. This will cause some or all of the loopback signal to be cancelled. In some cases a brief chirp can get through before the AEC adaptive filter converges.

aec_latency_chirp

So we should add an option to use alternative signals in place of the pulse train including

philburk commented 1 month ago

It would also be nice to display waveforms of the output and input recordings.

And we should show the measured latency even if the confidence is very low.

philburk commented 1 month ago

Similar to #1291

philburk commented 1 month ago

I found that I can defeat the AEC just by enabling the Session checkbox and leaving the AEC checkbox off.

JimG777 commented 1 month ago

I found that I can defeat the AEC just by enabling the Session checkbox and leaving the AEC checkbox off.

That seems to be the case on many devices that I have tested with, but not all:

Other devices varied. Most of my Pixel devices had the same behavior as yours (except the Pixel 1).

Why is there so much variation here?

Also, what is the expected behavior? I thought that if using the VoiceComm preset, the "/vendor/etc/audio_effects.xml" would get applied automatically. That generally seems to be the case, but why does providing the SessionId to Oboe override that?

My tests use these OboeTester settings for input: