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 16764 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Automatic recording

OK, this is a weird one I admit...

My sister has a very pesky speaking bird (uhmm...don't know English name, search for "gwarek" on google image search) that...well...doesn't speak almost (probably...) at all. Almost...unfortunatelly :/
And he especially doesn't speak when someobody's in room, etc
So: she has the idea to record it (she claims that once the bird speaks, he speaks almost perfectly...oh well, some imagination probably)

Here's the idea: I'll donate my very old laptop (with win95...) to the cause...unfortunatelly it has very small HDD, so speex would be great I guess (voice activated recording - perfect). Since this is my dumb sister and I'm not living with family anymore, it would be preferable if the thing started automatically with win and reamained...well, not in front will be enough I guess (but it's not necessesity; if she claims she trained the bird, I hope I can train her...)

Any ideas?

Automatic recording

Reply #1
OK, I've found something: Sound Snooper, quite perfect for the job. Unfortunatelly, although I did install illiminable codecs, Speex doesn't appear on the list, and the other are totally alien for me. So I'll list them and I ask you for help in choosing one that will have good sound quality and at the same time smallest possible size. What's worse it seems I'm quite limited in choosing kbps, bits per channel, and frequency in this app (I'll also list what's available)...

ACELP.net  11kHz, mono, 1kb/s (?!)
CCITT A-Law  11kHz, 8bits, mono, 10kb/s
CCITT U-Law  as above
GSM 6.10  11kHz, mono, 2kb/s (?!)
IMA ADPCM  this one has 4bits...so terrible I think
Microsoft ADPCM  as above
Microsoft G.723.1  8kHz, mono,  6400 & 5333 bit/s, 0 kb/s (?!)
Windows Media Audio V1  10kbps, 11KHz, mono, 1kb/s (?!)
Windows Media Audio V2  as above

(main reason I'm asking instead on trying - I have no microphone, and I'd like to finish at my sisters place as quick as possible when I'll ride there one day)

Or is there any way to use Speex? (Sound snooper says in help file "Sound Snooper can save records in different formats that are supported by ACM (Windows Audio Compression Manager).")

Automatic recording

Reply #2
You can try to use liveincode, and record the bird speaking directly to speex files.
Alguém pare o mundo que eu quero descer!!

Automatic recording

Reply #3
Speex has 2 nice options --VAD (Voice Activity Detection) and --DTX (file-based discontinuous transmission), thanks to them you can save a lot of disk space. Lately I recorded 24 hours in speex format and it took about 120MB IIRC (the room was empty for 23 hours and for 1 hour there was those thiefs speaking  ).
I used foobar2000's Record function with following Speexenc command-line in Diskwriter:
--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.

Automatic recording

Reply #4
Is Speexenc the standard form the speex site?

(and I seem to remember that I've read somewhere that the official one doesn't have yet VAD...so is there some special one I'd have to download?)

Automatic recording

Reply #5
Quote
Is Speexenc the standard form the speex site?

(and I seem to remember that I've read somewhere that the official one doesn't have yet VAD...so is there some special one I'd have to download?)
[{POST_SNAPBACK}][/a]

I think it's had VAD in for a long time, but why not use latest unstable version? (Found e.g. on  [a href="http://rarewares.org/others.html]RareWares[/url].) I don't know why there's a "stable" and an "unstable" branch, unstable has been working without any problems for me....
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #6
Quote
Speex has 2 nice options --VAD (Voice Activity Detection) and --DTX (file-based discontinuous transmission), thanks to them you can save a lot of disk space. Lately I recorded 24 hours in speex format and it took about 120MB IIRC (the room was empty for 23 hours and for 1 hour there was those thiefs speaking  ).
I used foobar2000's Record function with following Speexenc command-line in Diskwriter:
--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.
[a href="index.php?act=findpost&pid=305380"][{POST_SNAPBACK}][/a]


Is this possible in fully automatic fashion? (so foobar will start recording right after startup by link in autostart, all by itself)

Automatic recording

Reply #7
Quote
Is this possible in fully automatic fashion? (so foobar will start recording right after startup by link in autostart, all by itself)
[{POST_SNAPBACK}][/a]

You could probably make a batchfile with command line options and put a link to it in autostart. Or Scheduled Tasks, run at startup. Find foobars command line options by running "your path to foobar"\foobar2000.exe /? in CMD. (You can also search on forum for how to access menu or context menu options by way of commandline).

Another option is to use Case's piperec (preferably the version where Preuss fixed the CPU hog bug), put speexenc.exe and piperec.exe somewhere in %PATH% and make a batchfile like e.g.
Code: [Select]
@echo off
title record speex from recording device
piperec 16000 16 1 | speexenc --quality 8 --vbr --vad --dtx --nframes 10 --comp 10 --denoise --agc - - > "C:\My Recordings\test.spx"

And just have the batchfile autostart at startup. This is a fully commandline solution, and quite simple. To stop recording, bring the CMD window in focus and hit CTRL+C.

[a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=33453&view=findpost&p=292439]link 1[/url], link 2, link 3, link 4

EDIT:
You shouldn't take anyones word for what's best wav input samplerate/bitdepth/channels or best switches for speexenc. Experiment, and see what fits best in regards to filesize/quality for your use. Switches can be found by running speexenc -h in CMD.
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #8
Thank you for quick reply.

I wonder...does the command line options in foobar allow automatic recording, when doing it manually requires choosing menu options form tool window inside foobar, clicking ok, choosing path, etc.? I can't quite find anything that would suggest it... 
(The real issue probably is that I'm totally ignorant when it comes to command line, batch files, etc. - although I am cosnidered by few as "advanced" and such crap, the thuth is: only in GUI, and probably only bacause I don't afraid it, not because I  know everything...I started serious adventure with classic macs, then moved directly to windows...)

Also, another thing: I don't have means to check it (public computer at uni), but I assume that use of piperec will cause a command line window to appear whole the time...as I mentioned above, the less things the user of this solution will be able to do wrong, the better (so it's preferable if it'll be fully automatic & hidden...). or perhaps it's possible to hide this window?

Thanks again for help.

Automatic recording

Reply #9
Quote
I wonder...does the command line options in foobar allow automatic recording, when doing it manually requires choosing menu options form tool window inside foobar, clicking ok, choosing path, etc.? I can't quite find anything that would suggest it... 
[{POST_SNAPBACK}][/a]

All settings in foobar would have had to be set beforehand, I guess. I haven't tried if this can actually work. Maybe not. So I think piperec solution would be better for you.

Quote
Also, another thing: I don't have means to check it (public computer at uni), but I assume that use of piperec will cause a command line window to appear whole the time...as I mentioned above, the less things the user of this solution will be able to do wrong, the better (so it's preferable if it'll be fully automatic & hidden...). or perhaps it's possible to hide this window?
[a href="index.php?act=findpost&pid=306596"][{POST_SNAPBACK}][/a]

Check [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=34760&view=findpost&p=306118]this[/url].
EDIT: Alternative is to make a shortcut to the batchfile and choose in the Properties of the shortcut to start up minimized (and drag shortcut into Startup folder). This way it will still show up on Taskbar, but that gives you an opportunity to maximize window to stop recording if desired (not sure if first option allows for that, or if you will just continue recording until you shutdown system).

You can easily learn enough 'bout commandline and batchfiles to get something like this going.... 
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #10
Take care that if restarting machine like this it will start recording, overwriting any existing file. The best ting here would be to have the setup not overwriting existing file, but auto append a number to the filename or something (e.g. date & time), like if you have it write to a file recording.spx, if a file of that name already exists it doesn't overwrite it, but creates a new file recording_1.spx, then recording_2.spx, and so on. However, I hardly think something like that is possible within the framework of a simple batchfile. I guess it would take some more advanced scripting, or the addition of some program of which I don't know the existence of to the setup to achieve something like that.... It's beyond me, I'm afraid.... Maybe someone else have a suggestion?
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #11
Quote
Maybe someone else have a suggestion?


Code: [Select]
piperec 16000 16 1 | speexenc --quality 8 --vbr --vad --dtx --nframes 10 --comp 10 --denoise --agc - - > "C:\My Recordings\earwig%TIME%.spx"


i think you can add %time% to the filename...

maybe not if the times format messes up the filename,

oh yeah this is it,
%random%%random%

Code: [Select]
piperec 16000 16 1 | speexenc --quality 8 --vbr --vad --dtx --nframes 10 --comp 10 --denoise --agc - - > "C:\My Recordings\earwig%random%%random%.spx"


That makes it ~usualy not overwrite a previous file~
no conscience > no custom

Automatic recording

Reply #12
Quote
That makes it ~usualy not overwrite a previous file~
[a href="index.php?act=findpost&pid=306684"][{POST_SNAPBACK}][/a]

Super  !
I guess it would take a lot of trial to get %random%%random% to produce the same number twice, so I guess it's quite safe

(If one where paranoid one could do somename%random%%random%%random%%random%.spx)
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #13
Awesome guys! Thank you very much for the help. It seems I'm all set (now I just have to download all files & instructions on cdr (uni) and hope I'll be able to do it all  )

Automatic recording

Reply #14
One problem with piperec: the archive with version that doesn't hog cpu is apparently broken...

Automatic recording

Reply #15
Quote
One problem with piperec: the archive with version that doesn't hog cpu is apparently broken...
[a href="index.php?act=findpost&pid=306774"][{POST_SNAPBACK}][/a]

It works OK here. Try to empty all cache, tempdirs, downloads and restart browser, then try again. (If you absolutely can't make it work PM me an e-mail adress I can send it to).

EDIT: BTW. The fixed version in the package are named piperec_fix.exe, piperec.exe are the original. Difference in size are due to UPX compression of original.
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #16
Quote
Quote
That makes it ~usualy not overwrite a previous file~
Super  !
I guess it would take a lot of trial to get %random%%random% to produce the same number twice, so I guess it's quite safe

(If one where paranoid one could do somename%random%%random%%random%%random%.spx)

Heh, ive already been kinda paranoid, because %random% returns a four digit number ( on my system anyway), but odds can be deceptive and after a modest number of saves I think even 9999:1 gets a little risky.

Nice automatic recording setup here though. I did this with linco.exe and lame before, but had to run lame in high priority to stop dropouts - thats something to look out for.

A Low vbr lame command line could be,

Code: [Select]
start /high /min piperec 22050 16 1 | lame -r --bitwidth 16 -s 22.05 -V9 -m m --resample 22 -B64 --lowpass-width 3 -q 5 - "C:\My Recordings\Learwig%random%%random%.mp3"


I havent used speex, but dont like it when I get a phone connection which compresses the ambient noise out - so the line goes totaly silent when no ones speaking.

[span style='font-size:7pt;line-height:100%']edit:fixed one bug in commandline[/span]
no conscience > no custom

Automatic recording

Reply #17
Quote
Heh, ive already been kinda paranoid, because %random% returns a four digit number ( on my system anyway), but odds can be deceptive and after a modest number of saves I think even 9999:1 gets a little risky.
[a href="index.php?act=findpost&pid=306781"][{POST_SNAPBACK}][/a]

I know.  I was kinda joking. Well, putting in 4 %randoms%'s produce an 18-20 number digit, which should satisfy even the hyper hyper paranoid.....
Thank you, BTW!

Quote
Code: [Select]
start /high /min piperec 22000 16 1 | lame -r --bitwidth 16 -s 22.05 -V9 -m m --resample 22 -B64 --lowpass-width 3 -q 5 - "C:\My Recordings\Learwig%random%%random%.mp3"

[a href="index.php?act=findpost&pid=306781"][{POST_SNAPBACK}][/a]

Eh, shouldn't that be ... piperec 22050 16 1 ... ?

Quote
I havent used speex, but dont like it when I get a phone connection which compresses the ambient noise out - so the line goes totaly silent when no ones speaking.
[a href="index.php?act=findpost&pid=306781"][{POST_SNAPBACK}][/a]

Speex is quite nice for it's use. And you can get plenty of continual annoying background noise if you want, just drop --denoise and such, play around with the switches......
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #18
Quote
Eh, shouldn't that be ... piperec 22050 16 1 ... ?

Good catch
no conscience > no custom

Automatic recording

Reply #19
Actually, it doesn't like start /high /min piperec etc....

My PC starts beeping as mad.

But if you put piperec 22000 16 1 | lame -r --bitwidth 16 -s 22.05 -V9 -m m --resample 22 -B64 --lowpass-width 3 -q 5 - "C:\My Recordings\Learwig%random%%random%.mp3" in a mp3rec.bat on the other hand, and start it from CMD thus:
start /high /min mp3rec.bat
it starts just fine.....

That Lame commandline produces a file that playbacks as pure static at my place, though.... 

Doing it with my Speex batch file, though, produces a good file
start /high /min spxrec.bat

And it was same thing; putting start /high /min piperec (etc....) in the batchfile itself made my system protest like hell....
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #20
Quote
Actually, it doesn't like start /high /min piperec etc....
My PC starts beeping as mad.

oh well 
Quote
That Lame commandline produces a file that playbacks as pure static at my place, though.... 

-x swaps the byte endianism, could fix the static, or maybe piperec wont do that samplerate.

new lame try:
Code: [Select]
piperec 22050 16 1 | lame -r -x --bitwidth 16 -s 22.05 --priority 3 -V9 -m m --resample 22 -B64 --lowpass-width 3 -q 5 - "C:\My Recordings\Learwig%random%%random%.mp3"


experimental, add --scale 0.1 --athaa-sensitivity 3 to encourage silence detection, while increasing sensitivity at reduced volume, could decrease bitrate, file needs reamplified at playback.
no conscience > no custom

Automatic recording

Reply #21
Quote
new lame try:
Code: [Select]
piperec 22050 16 1 | lame -r -x --bitwidth 16 -s 22.05 --priority 3 -V9 -m m --resample 22 -B64 --lowpass-width 3 -q 5 - "C:\My Recordings\Learwig%random%%random%.mp3"

[a href="index.php?act=findpost&pid=306801"][{POST_SNAPBACK}][/a]

That line produced a working file.

Adding --scale 0.1 --athaa-sensitivity 3 also produce a working file, but volume level are almost inaudible..... much preamp would be necessary for playback...
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts

Automatic recording

Reply #22
Yep, something was wrong on the PC I've been using, it works fine on another one.

BTW, do I have to car about this "start /high /min" thing when using Speex?

Automatic recording

Reply #23
Only if you notice jitters happening in the recordings - then raising the processes priorities might help.
no conscience > no custom

Automatic recording

Reply #24
Quote
Only if you notice jitters happening in the recordings - then raising the processes priorities might help.
[a href="index.php?act=findpost&pid=306989"][{POST_SNAPBACK}][/a]
In that case you can do as follows:

Make a spxrec.bat thus:
Code: [Select]
@echo off
title record speex from recording device
piperec 16000 16 1 | speexenc --quality 8 --vbr --vad --dtx --nframes 10 --comp 10 --denoise --agc - - > "C:\My Recordings\polly%random%%random%.spx"

and put it in your %PATH%. Then make a run.bat:
Code: [Select]
start /high /min spxrec.bat

Make a shortcut to run.bat. Open Properties of this shortcut and choose Run: Minimized, then drag that shortcut into your Startup folder. Now it should start spxrec.bat as a high priority thread, minimized to taskbar when Windows starts up.
"ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
        - Oceania Association of Autonomous Astronauts