Friday, October 23, 2020

Android Call Recording

This is a quick (?) post related to how I record all my phone calls, on my Android phone, and save/upload/edit/share them.

First, I record my calls using "Automatic Call Recorder", available free for Android devices: Play Store.

Once it records a call I am interested in, I then use it save and then to upload it to my Google Drive.

Next, once it's uploaded from my phone, I download it again, on my PC. This gives me a .amr file.

AMR is a license and patent encumbered codec, which is a pain in the arse to get working on a PC, or at least it used to be..

I was then using Convertio (.co) to convert the recording from AMR to WAV, and to download the PCM wave file, so that I could open it, however..

Holy shit! I just found that Audacity now has built in support for AMR decoding, which it didn't used to, though it was probably 4 years ago when I last tried it.

Anyway, I was converting it to PCM/wave, but can now evidently just use the AMR file, and I load it up in Audacity.

Once loaded up, you'll see the wave form of the call, eg:

From here you can just play the call.

Sometimes it can be quite hard to hear, or at least the remote party may be, if they speak softly (moistly?), or have a crappy phone/phone system/line etc.

So I usually just amplify the entire call first, by selecting the entire call (Ctrl+A) and clicking Effect | Amplify.

This presents a box with some options for increasing the call volume:

This isn't going to work for us much, as that's a very small amount of amplification, yet the call is quite hard to hear..

If we go back and look at the waveform, we'll see there's a loud spike:

Sometimes this is just a pop, or a crackle or something, or some other breakfast cereal mascot perhaps, in which case it can be removed.

The process to do that is to zoom in on the spike, using the magnify option/buttons, or holding Ctrl and using the scroll wheel on the mouse.

Once zoomed in, you can select the loud area, and play it, to work out what it is:

In this case, it's me saying "yeah". As a result I will be leaving it in the call, but if it was a random pop noise etc, you could just delete it from the call.

So, since, in this case, it's valid audio, we're not going to delete it, but that makes it slightly more difficult for us to amplify the call..

We can either amplify the call anyway, which would mean that we would need to allow clipping, since we're going to end up cranking up the volume on this already loudest part even louder, and we'd need to guess by how much to amplify it, or, we can selectively amplify the quieter sections.

The process for doing this, or at least my process, since there's probably a better way to do it, is to zoom back out, and select a large area of the call where it's quieter, eg:

Then choose to amplify that section (Effect | Amplify). Now we have a better looking amplification level:

You can optionally turn up the amplification level more, manually, but by default it will set it to a level where the loudest part of the selection will hit the maximum volume before it requires clipping.

So if you increase it more, then you will need to enable "allow clipping", and will end up with some, hopefully only very short, part(s) of the audio which clips.

Alternatively, you can go back and be more selective about how much/which part of the audio you select, and avoid any loud peaks, and try it again, which will probably give a better result.

Once you're happy with the amplification level, and accepting clipping if necessary, hit OK. I don't bother with previewing, because I can just listen to the result, and undo it if necessary.

By selecting a couple of different sections of the audio, and bringing up the amplify settings dialogue box, you can get an idea of a reasonable level of amplification. Maybe 10? Based on that, if there are only a few spikes/peaks, then you may choose to just apply that to the entire call, and accept a couple of clipped sections.

Alternatively, you can just select a quieter part, set and apply the appropriate amplification level, and then make another selection, and use Effect | Repeat Amplify, to apply the same amplification level to the new selection.

Or perhaps you could just select the loudest part, and put a negative amplification on it, to reduce its volume, and repeat that on the other loudest parts/peaks, and then maybe amplify the entire call? I'm not sure if/what quality loss may be incurred by reducing and then increasing the volume of the same sections..

Anyway, You should now have a call with an average higher volume, which is much easier to hear. In some cases I need to only select the remote party's voice, and increase those sections, because my voice/the local side is already loud enough.

It should now look something like:

Having done that, the next thing is that you can cut bits out of the call. I pretty much only do this to extended silences, when there's a pause waiting for someone to respond, in order to reduce the length of the call.

I also sometimes cut out me going "ummmmm", which I seem to do a lot on some calls.

Oh, and I do it to remove people's names, phone numbers, email addresses etc, or anything else which shouldn't be publicly shared.

I'm not going to get into the legality of call recording and sharing here, just to say that, in Ontario, it is legal to record and share phone calls, as long as you are a party on the call. (I have also confirmed that with a lawyer.)

Also, sometimes I am a smartarse (sometimes?!) and I will tell the person that I am speaking to that I am recording the call, "for quality and training purposes". This perhaps gives them a warning to watch what they are saying, in the knowledge that I am recording the call.

With all that said, removing parts of the audio is very simple. It's done by clicking and dragging across a section to select it, and then you can hit spacebar to play it, to make sure you have the right part selected, and then you just hit delete to remove it from the call.

Or you can replace the audio, which may work better when it's being used to censor something, to make it more obvious that it has been censored. Things on the Generate menu can be used for this, like Chirp, DTMF Tones, Noise, Silence, Tone etc.

You will want to be mindful of the amplitude setting on these functions however, as it will default to full volume, so you may wish to set it quite low, like 0.2.

I like using the DTMF Tones generator, which will generate and replace the audio with some random tones, making it obvious that the original audio has been replaced.

So, once your recording is edited as appropriate, to fix the audio level, remove or replace private information, and remove long pauses or other unwanted noises, the project can be saved and the audio exported.

I use MP3 as my export format, and variable bitrate is probably reasonable for a low bitrate original audio recording.

I then upload the file to my webhost/server (I was previously sharing on SoundCloud, but I only have a free account, and I've used all my free space..), where I can link to it in blogs or on facebag etc.

Update:

Having to do some more files, and not wanting to go through the tedious process to selecting the other party and selectively amplifying them, I looked to see if there was a better way to do this.

I found a thing called AGC, Automatic Gain Control: https://forum.audacityteam.org/viewtopic.php?p=337691#p337691

I downloaded and installed it by dropping the files in my plug-ins directory under my home directory, and then using the enable/disable plug-ins function on the menu to enable it.

I tried doing a couple of files with it, and it's OK, it does a reasonable job of amplifying both ends to be similar in volume, but it also seems to get carried away amplifying the background noise during quiet/silent periods, creating these annoying "whoosh" noises.

I went through the file and found and removed all those, which is fairly easy because they have a fairly obvious shape in the waveform, making them easy to select and delete, which also shortens the call, however it still means there's a lot of manual editing, which I was trying to avoid..

I may try fiddling with the percentage settings, and the squelch, to see if it can be less aggressive on amplifying the background noise/quiet sections..