====== Silence detection and timestamping ====== Imagine there is something like civil band radio and you want to run some software overnight and have conversations logged like this: -rw-r--r-- 1 jenda jenda 183k rec-2012-08-08-18-37-37.ogg -rw-r--r-- 1 jenda jenda 98k rec-2012-08-08-18-41-49.ogg -rw-r--r-- 1 jenda jenda 100k rec-2012-08-08-18-47-35.ogg -rw-r--r-- 1 jenda jenda 200k rec-2012-08-08-18-54-52.ogg We will use one computer for receiving and another for splitting based on silence detection. ==== Receiving ==== gnuradio-companion sketch is [[http://jenda.hrach.eu/brm/rad/nbfm_rx.grc|here]]. It receives narrow-band FM, but changing it for other modulations should be easy. Create a pipe, run netcat to transmit data over the network and run the gnuradio program. mkfifo test.wav cat test.wav | nc 192.168.77.226 3333 & ./top_block.py ==== Detecting ==== On the other end (well, you can run everything on one computer just by piping it instead of using netcat) download and compile [[http://jenda.hrach.eu/brm/rad/squelch-cut.c|squelch-cut.c]] and run it like nc -l -p 3333 | ./a.out WAV (they are actually RAW) files should appear in current working directory after the first transmission occurs. Use oggenc to encode them to some more common format. oggenc -r -C 1 --raw-endianness 1 rec-*.wav