QUOTE(zima @ Jun 20 2005, 06:55 AM)
OTOH...does this priority stuff works at all in win9x? Somehow I don't think so...
I have no access to 9x, so you have to figure out what works and what don't yourself. Try some googleing. Experiment. One thing I'm pretty sure of is that the purely cosmetic "title" line I've added to my batchfile don't work. However, all it does are displaying the text after on the title bar.
I don't think you should care to much about priority, there's other things that's more important. I've been revising the Speex commandline that I basically just
copied off rutra80.
QUOTE(rutra80 @ Jun 11 2005, 12:47 PM)
--quality 10 --vbr --vad --dtx --nframes 10 --comp 10 --denoise --agc - %d
I think I've set sample rate to 8000Hz, bits per sample to 16, and channels to 1.
I used very crappy microphone but the effect was more than good enough.
First of all I think samplerate of 8000 give some very strange sounds on
s and
f's. I'll go for 16000 as good for speech (speex supports 8, 16 and 32 kHz). I'll also go for 16 bits as 8 bits gives some really ugly distortion on background noise (8 and 16 supported). Stereo are a total waste of bits for speech, so channels number 1; mono.
Speex options can be found
here.
I don't think its necessary, but I'll add -w for wideband (16 kHz) input. Options are -n, -w and -u (8, 16 and 32 kHz).
--quality 10 makes a file which averages at 38-40 kbps. Reducing to --quality 8 averages at 25-27 kbps, and sound quality is somewhat lower, but quite good. So this is a diskspace issue.
--vbr is a must for allocating bits intelligently. However;
QUOTE
VAD is always implicitly activated when encoding in VBR, so the option is only useful in non-VBR operation.
So one can remove --vad, it's on already.
--dtx
QUOTE
Discontinuous transmission is an addition to VAD/VBR operation, that allows to stop transmitting completely when the background noise is stationary. In file-based operation, since we cannot just stop writing to the file, only 5 bits are used for such frames (corresponding to 250 bps).
Very good for saving diskspace when nothing is happening.
--nframes. This is the documentaion I can find:
QUOTE
It is also possible to pack more that one frame in an Ogg packet (--nframes), reducing the overhead for low bit-rates.
-nframes n
Pack n frames in each Ogg packet (this saves space at low bit-rates)
Number of frames per Ogg packet (1-10), default 1
I don't really understand if this is useful here. Keep it in if you want, I think I'll take it out. I'm really unsure here. Wish there was some more comprehensive documentation on this switch...
Now we come to CPU consumption. This is what complexity, --comp, is about:
QUOTE
With Speex, it is possible to vary the complexity allowed for the encoder. This is done by controlling how the search is performed with an integer ranging from 1 to 10 in a way that's similar to the -1 to -9 options to gzip and bzip2 compression utilities. For normal use, the noise level at complexity 1 is between 1 and 2 dB higher than at complexity 10, but the CPU requirements for complexity 10 is about 5 times higher than for complexity 1. In practice, the best trade-off is between complexity 2 and 4, though higher settings are often useful when encoding non-speech sounds like DTMF tones.
So this is a complexity vs. speed switch. The higher complexity the more CPU useage (speex default are 3).
--comp 10 using 5 times as much CPU as --comp 1. So it might not be wise to use --comp 10 on an old 9x box.
--denoise
QUOTE
Denoise the input before encoding
Very good when recording from a cheap mic.
--agc
QUOTE
Apply adaptive gain control (AGC) before encoding
Also good when recording from cheap mic, I suppose. Keep it in.
Also adding -V (prints bitrate used to console), so you'll see some activity
if you'll ever maximise the window...
So my revised line will be something like this, edit according to your needs:
CODE
piperec 16000 16 1 | speexenc -w --quality 8 --vbr --dtx --comp 4 --denoise --agc -V - - > "C:\My Recordings\polly%random%%random%.spx"
EDIT: BTW. One thing I forgot to mention; If you use ICL compiles from RareWares, don't forget to put
libmmd.dll in %PATH%.