Hi Brian,
I posted the same question stackexchange*, and someone immediately identified the issue as clipping. See how interesting:
ref = librosa.chirp(fmin=30, fmax=3400, sr=8000, length=30)
deg = load_raw_audio(deg.raw)
clip = np.clip(ref, -0.9, 0.9)
First ref:
Then deg, which I recorded over the a phone call
Now clip from np.clip(ref, -0.9, 0.9):
The main thing I learned is that aliasing can have more than one cause. I knew about insufficient sample rate, and now I added clipping to the list of possible causes. To "solve" the issue, I multiplied the reference file by 0.4 to reduce the amplitude, and this is what I got:
Now I can start trying to understand what is going on with the modem, and how it degrades the audio. The likely cause of the clipping was that the digital land line and the mobile modem involved in the call had a mismatch of their dynamic ranges. Lowering the transmitting volume solved the issue.
Thank you for the hints about the vertical artifacts, and let me know if you have ideas on how to debug further. I will post here when I find out what is the cause.
Thank you Brian!
[...]