An old 3.5 inch floppy disk holds
1.44 MB of data. According to my calculations, that's
1,424 KB blocks. For a total of
1,458,176 Bytes. Once formatted as FAT, you end up with
1,457,664 Bytes of storage. But how much audio can a floppy hold?
(Here I mean wave based audio of human speech. It's trivial to fit more in using MIDI or speech synthesis.)
I'm going to use "A Podcast Of Unnecessary Detail" to experiment with, as this blogpost also has too much detail. The podcast is a 39MB MP3, running just over half-an-hour.
Here's the first 40 seconds of the original MP3 file, so you can hear the music, and male and female voices.
That's about 800KB. A floppy can hold about a minute and a half of that quality audio.
A floppy disk holds about
11,000 Kilobits. So, to hold 1,800 seconds (30 minutes) of audio, we need to encode audio at about 6kbps (Kilobits per second)
By coincidence, the Opus audio format supports encoding speech at around 6Kbps.
Here's the same sample of the podcast bounced down to mono and encoded at 6Kbps. The voices are pretty clear, but the music is extremely mushy. (The following files are in .opus format. They should play fine on Android and most desktop browsers).
opusenc in.wav --downmix-mono --bitrate 6 out.opus
But that's still a little too big. The 33 minute podcast weighs in at
1,581,781 Bytes. Too large for a floppy.
--framesize option, we can set the Framesize to 60 milliseconds. Not great for streaming, but we don't care about that, and it makes the files much smaller.
opusenc has a few more tricks up its sleeve! Using
--cvbr we can force the encoder never to go above a bitrate limit.
opusenc in.wav --downmix-mono --bitrate 6 --cvbr --framesize 60 out.opus we can save 33 minutes, 8 seconds, in
1,422,676 Bytes. Enough space left over on a floppy disk for an image.
opusenc documentation is not quite telling us the whole story! You can pass any number lower than 6 to
opusenc and it will try its best.
In practice, the lowest bitrate it will generate for speech is about 4Kbps. Here's the same sample:
opusenc in.wav --downmix-mono --bitrate 4 out-4.opus
What's the lowest we can go? How low before we lose all meaning?
The absolutely lowest encoding which produced any sound at all was 1.2Kbps. I warn you, this sounds awful!
opusenc in.wav --downmix-mono --bitrate 1.2 --hard-cbr out-1.2-hard.opus
This uses the
--hard-cbr option which forces the encoder to a specific constant bitrate.
About the lowest you can go and still have things even vaguely intelligible was 2Kbps. Again, this sounds horrible, but it is just about possible to understand most of the speech. Even if they do sound like Daleks with low batteries!
opusenc in.wav --downmix-mono --bitrate 2 --hardcbr out-2-hard.opus
If you were prepared to have you audio that shitty, you can just about squeeze a full hour of speech onto an old floppy disk.
So, guess what tomorrow's blog post is going to be...?
If you like the silly things I do, you can say thanks by:
Or, just leave a supportive comment.