save as ogg file?

Forum for TextAloud version 3

Moderator: Jim Bretti

Post Reply
jmotlagh
Posts: 1
Joined: Mon Sep 07, 2015 1:48 pm
Contact:

save as ogg file?

Post by jmotlagh »

Is there an option or encoder that will allow me to save to an ogg file?
Jim Bretti
Posts: 1558
Joined: Wed Oct 29, 2003 11:07 am
Contact:

Re: save as ogg file?

Post by Jim Bretti »

We don't currently have complete support for ogg, but if you have a command line ogg encoder there is a way you can hook it into TextAloud. Here's how to do it.

I downloaded an ogg encoder from http://www.rarewares.org/ogg-oggenc.php. So I have an encoder named oggenc2.exe located in the folder c:\users\jim\utilities\encoders

In TextAloud, click Tools -> Audio File Options -> Custom Encoders, and click the Add button. In the dialog displayed, pick some name for the custom encoder. The Sample Rate and Number Of Channels dropdown configure how TextAloud streams audio to the encoder. You can experiment with these, but ideally the sample rate should match the sample rate for the voice you're using. I'd go with number of channels = 1 to start.

For the command line, the idea is to specify the command that runs the encoder, including settings such as quality settings, bitrate, output filename, etc. The requirements are that the encoder must accept input from stdin, and no output is written to stdout or stderr. If the encoder writes any kind of output messages or error messages, the encoder will most likely crash.

My command line looks like this:

C:\Users\Jim\Utilities\Encoders\oggenc2 - -o "%AudioDirectory%\%Title%.ogg" --quiet -q 0

The very first - indicates that the encoder receives wav input from stdin. %AudioDirectory% and %Title% are replaceable parameters that are replaced with your TextAloud audio directory / article title. It is important to specify --quiet to prevent any output messages.

You can configure the command line however you want, this should give you the basic idea.

Once you have this set up, the name you chose for the custom encoder will appear in the Audio File Format dropdown. So you just pick your encoder name as the audio format to use your custom encoder.

Let me know if you have questions. One of these days we'll add support for ogg but hopefully this will work for you.
Jim Bretti
NextUp.com
Post Reply