Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Automatic recording (Read 16763 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Automatic recording

Reply #25
Unfortunately, when checking closer, that seems to start only CMD.exe with high priority, while piperec.exe and speexenc.exe still runs at normal priority.... 
As posted above, adding start /high /min in  the batchfile itself only achieved manic beeping from my PC, so then I don't know how to start speexenc.exe with high priority in this setup....
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

 

Automatic recording

Reply #26
Yeh tricky that, but ive got you hacking ahead of yourself  Theres probably no problem with it at normal priority 
no conscience > no custom

Automatic recording

Reply #27
Quote
Yeh tricky that, but ive got you hacking ahead of yourself  Theres probably no problem with it at normal priority 
[a href="index.php?act=findpost&pid=307013"][{POST_SNAPBACK}][/a]

Yes. It's probably only stupid to do it unless you get dropouts or stuttering or such.... on a reasonably fast system this shouldn't happen. I was more thinking of zima whom I think said was going to use an old comp, in which case such things might occur.....
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #28
OTOH...does this priority stuff works at all in win9x? Somehow I don't think so...

Automatic recording

Reply #29
Quote
OTOH...does this priority stuff works at all in win9x? Somehow I don't think so...
[{POST_SNAPBACK}][/a]

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 [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=34607&view=findpost&p=305380]copied[/url] off rutra80.
Quote
--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.
[{POST_SNAPBACK}][/a]


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 [a href="http://www.speex.org/manual2/node5.html#SECTION00051000000000000000]here[/url].
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: [Select]
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%.
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts