Audacity OGG encoder not working with VS1000

Writing software that inputs and/or outputs audio and performs DSP algorithms such as filters, new codecs or audio effects.
Post Reply
joe6486
Senior User
Posts: 23
Joined: Mon 2013-06-24 17:29

Audacity OGG encoder not working with VS1000

Post by joe6486 » Tue 2018-10-02 21:34

We've been trying to help out a customer with a problem, and it appears that the VS1000 module does not properly decode ogg files that were encoded with audacity. The files play perfectly on a computer, but there are all kinds of awful artifacts when playing the same files on the VS1000.

We can use another encoder, of course, but anyone know the cause or a workaround within audacity?

User avatar
pasi
VLSI Staff
Posts: 1501
Joined: Thu 2010-07-15 16:04

Re: Audacity OGG encoder not working with VS1000

Post by pasi » Wed 2018-10-03 13:43

What are the encoding parameters, i.e. samplerate and quality? Can you include a portion, or send an example file to support@vlsi.fi ?

A high quality setting creates a high bitrate, which requires more CPU for transfer from uSD card leaving less for decoding, and may also need more CPU to decode.

The default clock the audio module firmware uses is 3.0x (36MHz). It can be increased to 3.5x from uartctrl.c. If GAPLESS is defined, the clock is also set to 3.5x.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

joe6486
Senior User
Posts: 23
Joined: Mon 2013-06-24 17:29

Re: Audacity OGG encoder not working with VS1000

Post by joe6486 » Fri 2018-10-05 19:28

Thanks. I'll email a link. The bitrate is about 500kbps, so maybe that's too high?

Are there any definitive specifications for what type of .ogg file is acceptable? (WAV also, while we're at it.) This is all for microSD playing.

joe6486
Senior User
Posts: 23
Joined: Mon 2013-06-24 17:29

Re: Audacity OGG encoder not working with VS1000

Post by joe6486 » Fri 2018-10-05 19:44

Looks like there is a nominal setting for bitrate in audacity, but I'm not sure what the VS1000 can support:

https://wiki.audacityteam.org/wiki/OGG

User avatar
pasi
VLSI Staff
Posts: 1501
Joined: Thu 2010-07-15 16:04

Re: Audacity OGG encoder not working with VS1000

Post by pasi » Mon 2018-10-08 12:07

It seems 500kbit/sec needs 3.5x clock to play without hiccups in the vs1000 audio module. The default is 3.0x clock. (Due to UART control the firmware needs to use a fixed clock.)

Usually Ogg Vorbis quality 6 gives around 192kbit/sec, which is generally enough for music in Ogg Vorbis format. Quality settings 7 and 8 probably work, and 10 and probably 9 should not be used due to generating unnecessarily high bitrates.

There's some applicable information in "How to encode Ogg Vorbis files from MP3 or WAV format" application note from http://www.vlsi.fi/en/support/applicationnotes.html . It also gives hints on how to reduce the file size of voice files.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

joe6486
Senior User
Posts: 23
Joined: Mon 2013-06-24 17:29

Re: Audacity OGG encoder not working with VS1000

Post by joe6486 » Mon 2018-10-08 15:06

Thanks! I can tell them to limit OGG bitrate to, say, 320kbps or so.

What about WAV file formats, are there any definitive specifications I can offer to users?

We'll change the clock if we have to but we haven't looked at our custom code in a while. I think we're ok just instructing customers accordingly.

User avatar
pasi
VLSI Staff
Posts: 1501
Joined: Thu 2010-07-15 16:04

Re: Audacity OGG encoder not working with VS1000

Post by pasi » Mon 2018-10-08 17:29

Wav doesn't take any CPU to decode, and I have played 44.1kHz stereo 16-bit WAV's without issue.

Another thing to note is that with 12MHz clock, the maximum playback rate is 46875Hz, so 48kHz rate will play 2.4% slower than it should. If this bothers the customer, recommending to use 44.1kHz is a good idea.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply