// \\ |! / 0````````````0 \ !| |! [ ( | Speexenc | ) | !| |! \ 0............0 / !| \\ // So here's how to use speexenc, the lil' encoder-that-could. For this to work, you should have speexenc and sox installed on your linux system. First of all, your input sound file should be in either 8khz, 16khz, or 32khz: p------------------------------------------------q | bash$ sox foo.bar channels 1 rate 16k baz.wav | b------------------------------------------------d Note that I've also converted it from a .bar file to a .wav file. .wav is a good all-purpose format that we may as well use since every audio application will accept it as an input file. I've also converted it to mono. If you're going out to speex, you also probably don't need stereo sound. This is just an assumption on my part, but seriously if it's fidelity you seek then speex isn't the codec you're looking for. Now let's feed this to speexenc and make it sound bad. p-----------------------------------------------------------------------q | bash$ speexenc --author "klaatu" --title "my_speex_file" | | --abr 64000 --denoise --quality 2 --comp 6 -w baz.wav foo.speex.ogg | b-----------------------------------------------------------------------d Ok, step by step: speexenc = the name of the app :) --author = meta tag containing my name --title = meta tag contaiing track title --abr = Average Bit Rate. this is optional. Another option is VBR, and depending on a lot of different factors, you choice will vary on what to use. Experiment, knock yourself out. --denoise = A great option to reduce snaps, crackles, pops created by encoding --quality = 1-10 I think; 10 being really high quality. I use speex on my oggcast to create super small files, so I go very low qual. But you may not want this, so..again, experiment. --comp = complexity. This has a lot to do with how more 'complex' sounds are encoded. If there is music (and there really shouldn't be in a speex file) then you'll need really high complexity, like 6 or above. For my oggcast I use 3, because I cut music from my speex version. But for Information Underground, I use a high complexity because we don't mind the larger file size and we do include some basic music. -w = "wideband", which is hardcoding the fact that Hey, we're feeding you a 16khz file! Other options are -n for 8khz and -u for 32khz. This is not technically necessary because speexenc will kinda auto-detect it. But I use it anyway. baz.wav = input file foo.speex.ogg = output file. notice that i'm stuffing the speex file into an ogg container. I do this because servers don't know what a speex file is, half the time, while they more often can be trained to recognize an ogg. I just find the ogg container makes the file a little more universal, which is helpful when using an uber-obscure codec. ... and that's about it! Notes: Speex doesn't like music, or really any sound that is longer than the typical human speech-produced long vowel sound. If you have complex sounds, then use a high --comp setting. Variable bit rate is nice. I hard code --abr when I don't care about file size, and use --vbr when I like to make sure I'm getting the best quality in the smallest file.