Page 1 of 2

Compressing voice recordings

Posted: Sat Apr 14, 2012 1:53 pm
by webfork
Problem

So I want to back up a long list of audio voice recordings I've done over time. I've been looking around online for some suggestions about compressing audio, specifically from a human voice. My device is encoding them in very high quality, which is unnecessary and takes up a lot of space.

Solution

With the popularity of VoIP and the shift in the industry towards SIP connections rather than regular wired connections, I was thinking there would be some amazing software out there for compressing voice. However, most research found audio range compression which is a very different process than data compression. What I could find was centered on voice audio streaming/transmission rather than saved files. So I did some testing with what I already know about the topic.

Current process
  1. Extract the files from M4A to WAV format using XMedia Recode
  2. Once there, open SpeexDrop
  3. Settings: variable bit-rate (VBR), downmix stereo to mono, 10 encoding complexity and quality, 1 frame per ogg packet,
Performance

Right now my performance is around 60% of the original file size and very minor audio compression artifacts (if you're really listening for them). At the "7" encoding level, I can get around 44% but that metallic sound is more noticeable. (Its about 4.8k and 4k per second respectively.)

This seems like a good result, but the encoder hasn't been updated in years. About.com's entry on various codecs seem to indicate its variable bit-rate ability is unique, but was wondering if anyone else had messed with this.

Suggestions?

Re: Compressing voice recordings

Posted: Sat Apr 14, 2012 10:57 pm
by m^(2)
http://www.opus-codec.org/ ?
It's the latest greatest codec, with superb quality / space tradeoff, but it focuses on somewhat higher bitrates than Speex, so it may not be better for you. It's hard to tell because the settings that you give tell me nothing, I think that it would be better if you gave us your current and target bitrates.

Re: Compressing voice recordings

Posted: Sun Apr 15, 2012 9:28 am
by webfork
m^(2) wrote:It's the latest greatest codec, with superb quality / space tradeoff, but it focuses on somewhat higher bitrates than Speex, so it may not be better for you. It's hard to tell because the settings that you give tell me nothing, I think that it would be better if you gave us your current and target bitrates.
I'm flexible here: the bitrate is less important than having data that's understandable at the lowest possible file size. For example, I could just re-encode using our MP3 Quality Modifier to a lower bitrate but I'm hoping for a better codec than MP3 or Speex. As Wikipedia puts it, the codec that throws out as much as possible while "... keeping just enough to reconstruct an 'intelligible' voice" without noticeable artifacts.
Yeah, that's definitely what I'm looking for, but it looks like they're working with this as a streaming system at this point in the development rather than the encoding of a saved file?

Anyway, thanks for the info. I'll keep my eye on this project.

Re: Compressing voice recordings

Posted: Sun Apr 15, 2012 11:29 am
by m^(2)
Well, you want to have files that are understandable, yet smaller. That's where bitrate comes into play. You want something smaller than what you have already and the best thing you can do to tell people where you are is by telling what average bitrate do you get.

As to Opus, well, I don't know. Streaming is surely their main focus, but I've seen individual files (among others, in Hydrogenaudio comparison), so people use it either way.

Re: Compressing voice recordings

Posted: Sun Apr 15, 2012 12:10 pm
by freakazoid
Here's a Speex vs Opus comparison by Google:
http://www.ietf.org/mail-archive/web/co ... faNJE6.pdf

The PDF lists a bunch of other codecs I've never heard of before (a lot of them not open-source), which you can find on Wikipedia:
https://en.wikipedia.org/wiki/Compariso ... io_formats

Re: Compressing voice recordings

Posted: Sun Apr 15, 2012 12:29 pm
by m^(2)
Opus is the new name of CELT. :)

Re: Compressing voice recordings

Posted: Sun Apr 15, 2012 12:35 pm
by freakazoid
Yeah, I just found out!
I've edited my post above to be more useful! ;)

Re: Compressing voice recordings

Posted: Sun Apr 15, 2012 2:01 pm
by webfork
m^(2) wrote:Well, you want to have files that are understandable, yet smaller. That's where bitrate comes into play.
Of course. I'm getting clear-sounding results on Speex at (on average) 30kb/s.

Re: Compressing voice recordings

Posted: Tue Apr 17, 2012 10:35 am
by m^(2)
That's not very low. Opus should allow you to save some.

Re: Compressing voice recordings

Posted: Tue Sep 11, 2012 6:05 pm
by webfork
m^(2) wrote:That's not very low. Opus should allow you to save some.
I didn't look into this in great detail because I couldn't find a converter but a lot has changed since I first looked into it:

News:
Software:

Very exciting stuff. My music player already runs Rockbox.

Re: Compressing voice recordings

Posted: Tue Sep 11, 2012 8:24 pm
by lautrepay
BASSOPUS 2.4 was released on 08/17/2012.
The lastest AIMP3 Beta already includes a decoder for the Opus format, and I suppose that other players based on the BASS audio library (XMPlay, Trout, Nemp, MusicBee) will start to offer support for this new codec soon.

Re: Compressing voice recordings

Posted: Tue Sep 11, 2012 8:43 pm
by m^(2)
Many players support it already.

Re: Compressing voice recordings

Posted: Wed Sep 12, 2012 1:50 am
by lautrepay
m^(2) wrote:Many players support it already.
Portable players?

Re: Compressing voice recordings

Posted: Wed Sep 12, 2012 2:40 am
by Midas
This sure makes OPUS look like a strong contender for all-around audio dominance:

Image

[Source: http://opus-codec.org/comparison/]

IMHO and for the sake of completeness, current top contenders are:

Re: Compressing voice recordings

Posted: Wed Sep 12, 2012 9:23 am
by m^(2)
FLAC is rubbish. Unmaintained for years, weak and slow, except for decompression.
It gained some popularity because of missteps of competition, but I can't understand why is it growing.