Re: [LAU] How to remove buffering silence from wav files

From: Nigel Henry <cave.dnb2m97pp@email-addr-hidden>
Date: Sun May 30 2010 - 22:19:25 EEST

On Sunday 30 May 2010 15:32, Kjetil S. Matheussen wrote:
> Nigel Henry:
> > Big problem for dialup users since BBC stopped realmedia streams.
> >
> > Listening to BBC radio on dialup is now hopeless as both the BBC's
> > iplayer (flash), and wm streams need all the dialup bandwidth plus more
> > (48kbps), so what I'm doing is recording the programmes, and hope to
> > remove the silent buffering sections after which I can listen to them in
> > the normal manner.
> >
> > Removing the silent bits manually, in mhwaveedit for example is going to
> > take forever, so the question is, does anyone know of anything that would
> > accomplish this automatically? I can think of 2 options as below, but
> > how to accomplish them.
> >
> > 1: Some way of doing these recordings where the recording device will
> > pause for the buffering silences, then continue when the speech starts
> > again. Obviously it wouldn't want to stop for speech pauses, but these
> > are not completely silent as are the buffering silences. I'm using
> > qarecord at the moment for the recordings.
> >
> > 2: Some program to run the recorded wav files through, which would remove
> > the buffering silence sections.
>
> If you load your file into Snd, it should work to paste the following
> lines into the terminal Snd was started from:
>
> (let loop ((x 0)
> (x0 -1))
> (let ((y (sample x)))
> (cond ((and (= x0 -1)
> (= y 0))
> (loop (1+ x)
> x))
> ((and (not (= x0 -1))
> (not (= y 0))
> (> (- x x0) 32))
> (display "deleting")(display x0)(display " -> ")(display
> x)(newline) (let loop ((ch 0))
> (cond ((< ch (channels))
> (delete-samples x0 (- x x0) (selected-sound) ch)
> (loop (1+ ch)))))
> (loop x0 -1))
> ((and (not (= x0 -1))
> (not (= y 0)))
> (loop (1+ x) -1))
> ((< x (frames))
> (loop (1+ x) x0)))))
>
>
> You might want to adjust the number 32 (minimum number of zero-frames to
> yield a deletion), but I think 32 should work fine.
>
Hi Kjetil.

Thanks for the suggestion. I'll give that a go. Never used Snd before, but
always ready to try a new program.

Manually editing in mhwaveedit is a real pain, even zoomed in a lot, but I've
managed to remove virtually all the silent bits that way, so that the
recordings play quite well now.

For future recordings "silence free" I found Doh!, a button in Kaffeine to
save stream. It means I have to initially play the program through to the
end, but can always do something else with the sound turned down, and play
the saved stream later.

Many thanks for your reply.

Nigel.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Mon May 31 00:15:04 2010

This archive was generated by hypermail 2.1.8 : Mon May 31 2010 - 00:15:04 EEST