vendredi 30 janvier 2015

Detect network sample rate of phone call on Android phone via Android SDK

I have been putting together some sample applications for a goofy Android application where I capture audio uplink/downlink data during a normal phone call (ie: recording downlink audio, and then streaming modified audio and sending it out over the network), and I do some pitch shifting and filtering in the middle, so the audio you hear sounds like Alvin and the chipmunks, and your voice also sounds high pitched to the person on the other side.


I've noticed that when I'm in certain coverage zones, the audio uplink/downlink is a 16kHz signal (wideband audio), but when I go into certain coverage zones the signal is 8kHz (narrowband audio). I always have the sample sample rate I'm getting from the Android SDK (24kHz I think), but the maximum frequency content actually present in the signal is limited by carried limitations.


Is there a way to query some sort of "mode" or something that lets me know the maximum frequency content present in the call via the Android SDK? Maybe there's some sort of AT command or query I can issue to the cellular radio?


I want to do this because I do a discrete Fourier Transform before applying my pitch shift transformation, and if I know the signal is band limited, I would only have to process half as many frequency bins. I know I could do a peak detection or something like that, but it seems that even in the case of 8kHz band limited calls, there is still some noise in the [8kHz,10kHz] band, so rather than determining the band limit via signal analysis, I was hoping there is some metric I could query from the cellular radio or the network itself to have a cut-and-dry answer.


Thanks!


Aucun commentaire:

Enregistrer un commentaire