70 4. ANALOG-TO-DIGITAL SIGNAL CONVERSION
L3.8 MULTI-RATE SIGNAL PROCESSING
Latency is the delay between the time an audio signal is captured and the time it is outputted.
e time required to collect samples in a frame and the time to process these samples affect
the amount of latency. Apps with low audio latency are desired for many audio applications.
Excessive latency causes mismatches between the utterance of words and hearing them. In many
audio application, it is desired to keep latency low, say below 15 ms.
For Android smartphones, the audio latency varies from device to device due to different
i/o hardware used. e ADC (Analog to Digital Converter) hardware in modern smartphones
provides the lowest audio latency at 48 kHz sampling rate. However, since much of the audio
signal processing is done at a 16 kHz sampling rate or lower, one needs to synchronize the
audio i/o hardware and the audio processing software in order to have the lowest latency that a
typical smartphone offers. is synchronization can be achieved by multi-rate signal processing
as illustrated in Figure L3.3.
Down-Sampling
by Decimation
Decimated Audio (16 kHZ) Processed Audio (16 kHZ)
Audio Output (48 kHZ)
Audio Input (48 kHZ)
Up-Sampling
by Interpolation
Audio Processing
(FIR Filter)
Figure L3.3: Multi-rate processing.
For low-latency operation, the audio needs to be captured from the smartphone micro-
phone at a 48 kHz sampling rate and by using the frame size that is recommended by the
manufacturer of a particular Android smartphone. Circular buffers are used to achieve the rec-
ommended frame size for input and output. For audio processing modules, the captured frames
are down-sampled to 16 kHz to match with the rate at which audio processing modules operate.