Voice Memos “Epidemic Failure” and How to Avoid it

Since fall of 2018, at Aero Quartet we have observed a surge of requests to fix audio recordings made with an iPhone and Voice Memos app.

TL;DR

  • In iOS 12, Voice Memos app has a feature called Replace to edit an original recording.
    Replace is not reliable and can corrupt the original recording.
  • Corrupted recordings can be repaired, but are significantly shorter in duration than originals.
    The missing duration is lost forever.

What I Have Observed

I have pulled data from recent Voice Memos requests to see what they have in common.
A pattern quickly emerged:

  • All the failures happened on phones running iOS 12, and in consequence, the redesigned Voice Memos application.
    The iPhone model doesn’t matter.
  • Failed recordings are always truncated, ie shorter in duration than what the user reports to have recorded, and also shorter than what the phone displays.
  • No way to reproduce the recording on the phone or on other devices
  • 

I have plotted here a dozen of requests:
The green line is where the dots should be. Unfortunately, all the corrupted recordings are significantly shorter than the original, this is why the dots are below the line.
On average, only one quarter to one third of the audio is still present in the damaged file.

Reproducing the Issue

I made a few experiments to reproduce the problem. On my iPhone 8 and iOS 12, the Voice Memos app has two recording settings: Compressed and Uncompressed.

The samples recorded with each setting have the following audio profiles:
Compressed: AAC format (mono 48000Hz), bitrate 64 kbit/s
Uncompressed: Apple Lossless format (ALAC mono 48000Hz), bitrate 720 kbit/s

When I compare this to the damaged samples that I am receiving, the first thing that strikes me is that format and bitrate are different.
All damaged files come in AAC format, but with a frequency of 44100Hz and a bitrate around 225 kbit/s.

After playing a bit with the app, I finally managed to produce samples with those settings when using the Edit Recording function.
Whenever you use the Replace button to alter the original recording, Voice Memos performs an audio transcoding operation in the background, which converts the format into 44100Hz.

This operation is necessary, because replacing audio disrupts the organization of encoded media. In other words, it cannot be done directly on encoded media, as replacement involves a second audio track, and the two tracks need to be “flattened”, to use the technical word, into a new encoded audio track.

The first take-away is that the failure only occurs when Replace feature is used.

Mechanism of Failure

Now, why does the failure happen? Although I don’t have have access to the source code, I can guess how and why the problem occurs.

The first hint is the disconnect between the user interface and the reality:
Whereas the app gives the impression that Replace is a real-time thing, flattening the recording takes some time to complete.
Even if you replace a few seconds in a 2 hours long recording, your iPhone will need several seconds, maybe even minutes for very long recordings, to produce the modified recording.
This operation happens in the background, but Voice Memos doesn’t reflect this. Instead of showing a progress bar, and labelling the recording as “in process” or “unavailable”, it makes it look like the change is done and the recording is available when in reality it’s not.

From here I can guess at several possible flaws in the Voice Memos software:

  • If flattening fails or does not complete, the recording being flattened overwrites the original, as is. This explains why it’s truncated.
  • The user interface lets you initiate operations (like a new Edit) on a recording being flattened and this makes the app crash.
  • Flattening and replacing the recording occurs as a single-step operation, without proper exception handling. Second step, replacement, should never happen if first step hasn’t been completed and verified first.
  • Instead, the software should do it in two steps: First, flattening would make the original clip unavailable and a progress indicator would show on the screen that it’s because it’s being processed. Second, in case of failure, the software would show an error message and revert the state of the recording. Finally, in case of success, the modified clip would replace the original one.

There’s never a good excuse for the sloppy implementation of a feature like Replace.
I suspect that Apple engineers wanted first and foremost to make Voice Memos look cool and to give the illusion of direct manipulation and instant effects. But technology doesn’t work that way, flattening takes time, and not reflecting it in the user interface ended, I believe, in a flawed design.

Letting the user do a new edit while flattening takes place, is when user interface and processing enter in conflict. When the app crashes, and probably when corrupted recordings are generated.

How to Avoid it

Having understood the failure mechanism, I can now give some advice to avoid it:

  1. Avoid using the “Edit Recording” as it seems that it’s not a reliable feature
  2. If you have to use it, take some precautions:

  3. Always do “Duplicate” and create a back-up of your recording before using “Edit Recording”
  4. After editing a Voice Memo, give enough time to your phone to perform the “flattening”.
    In particular, don’t do a second “Edit Recording” or a “Share…” immediately after an edit.

What Our Service Can Do

I often tell my customers that we do magic, but no miracles!
In the Voice Memos case, the magic is to fix the corrupted recording, and the miracle would be to restore the full duration, when only part of it is present in the damaged file.

If you have a corrupted Voice Memo (or any unplayable audio file, from any device), you can use our Treasured service to determine the true duration of audio present in the file, and then to repair it. Unfortunately, for the reasons I have explained above, in Voice Memos the duration is usually significantly shorter than expected, but many customers still consider that for important material, it’s better to recover one third of it than to get nothing.