Opus support

Forum for TextAloud version 3

Moderator: Jim Bretti

Post Reply
Aromor
Posts: 4
Joined: Thu Jul 22, 2010 5:25 am
Contact:

Opus support

Post by Aromor »

Opus is a very good audio audio compression format. Possibly the best. Royalty-free. So I think encoding support for it in TextAloud would be a good idea and allow the smallest possible file sizes.

http://wiki.hydrogenaudio.org/index.php?title=Opus
http://en.wikipedia.org/wiki/Opus_%28audio_format%29
http://opus-codec.org/
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Opus support

Post by Jim Bretti »

Thanks, we'll check this out and see if we can support in a future version
Jim Bretti
NextUp.com
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: Opus support

Post by Jim Bretti »

I noticed there is a command line tool for encoding opus audio, opusenc. You may be able to set up this command line utility as a TextAloud custom encoder. This is just a way for TextAloud to support encoders through a command line, even though the encoder isn't natively supported by TextAloud. If you want to try it, here are instructions:

First if you haven't already done this, download the opus tools for windows at http://opus-codec.org/downloads/. This download contains the command line utility for encoding opus files.

Unzip the download into a folder on your machine. On my system, I placed the tools in a folder named c:\Users\Jim\Encoders\Opus

Next, run TextAloud, and click Tools -> Audio File Options. On this dialog, click the Custom Encoders tab. Click the Add button to add a new encoder.

For the Encoder Name, just use something like Opus. You can configure multiple Opus encoders with different command line arguments if you want ... just save the command line configurations with different encoder names. The Sample Rate and Number of Channels fields apply to the audio stream sent from TextAloud to the encoder. If the encoder expects a specific audio format these fields allow you to configure it. In this case, for Sample Rate, use either 16000 or 22050, either one of those should work. I'd recommend setting number of channels to 1.

For the command line, include the full path to the opus encoder utility, along with the command line arguments. Instead of specifying a wav / aiff file on the command line to encode, a dash (-) is used to to indicate that audio data to encode is being sent from another program. For the Audio file name to create, we can use substitution parameters to cause the audio file name to be the same as if you used one of the natively supported encoders.

So here is what my command line looks like:

C:\Users\Jim\Encoders\Opus\opusenc - "%AudioDirectory%\%Title%.opus"

Once you're done, "Opus" should show up in TextAloud as an Audio File Format on the File Options tab. You won't be able to set bit / sample rate for your opus audio files, you'll need to configure this on your command line if needed.

I did some quick tests and it seemed to work ok.
Jim Bretti
NextUp.com
Post Reply