Hack of the Whenever I Get Around to It

September 23, 2009

GSquelch – command-line silence filter

Filed under: Uncategorized — Chris Merck @ 9:50 am

I like to read. Quite often however I come across an unfamiliar word, especially while reading in a foreign language. If I am at a desk I will underline the word(s) and come back later with a dictionary to learn the meaning. However, if I’m trying to relax, lying down with a paperback, it is inconvinient to underline or write down words. I would prefer verbal note-taking, but if I just run a recorder, mainly silence is captured. I want the voice-activated recording feature of those 90s personal voice recorders on my PC. But it does not seem like a straight-forward, costless, and free solution is available. Moreover there is some demand, as seen by the five posts and partial solutions on LinuxQuestions.

So, I wrote GSquelch, which allows for the filtering-out of those silent sections automatically at run-time. A ring-buffer is employed to ensure that the dictations are not cut-off and that a lead-in and lead-out are provided to capture soft sounds which often are found at the beginning or end of phrases but are not loud enough to trigger a traditional squelch.

Currently only unsigned 8-bit mono is supported, but I will soon add support for other common formats.

Here is the C++ source code:
(more…)

Advertisements

Blog at WordPress.com.