Automatic removal of mouth smacks

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Paul L
Posts: 1788
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Re: Automatic removal of mouth smacks

Post by Paul L » Wed Oct 23, 2013 2:47 am

UPDATE 10/23: see my next post.

A couple days' work at coding and debugging, and I have something that shows some promise already. I think this is good at detection, but variable at fixing the problems, sometimes very good, sometimes worsening the result with strange artifacts, but more often it is neutral to good.

Use it either to label clicks, or fix them, or show differences between fixed and original. Use the last on a duplicate track and compare the solo to the mixed sound.

The beauty of it is that sometimes I can remove a click in spectrogram view without a careful zooming in on the waveform. However the interval about the click that gets fixed is still dependent on the selection boundaries, because I skip over the sound in blocks and don't yet refine the determination of intervals to fix.

Maybe it isn't polished enough yet for the plugins board.

THIS IS AN OLD VERSION - SEE NEXT POST
DeClicker.ny
(10.76 KiB) Downloaded 154 times
Last edited by Gale Andrews on Mon Jul 18, 2016 11:06 am, edited 2 times in total.
Reason: Deprecated the old version

Paul L
Posts: 1788
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Re: Automatic removal of mouth smacks

Post by Paul L » Wed Oct 23, 2013 5:16 pm

Here's an update. I reorganized things so that the progress indicator bar is more meaningful, and I fixed a bug in the cutoff for high-pass biquad filters.

I think my next task will be to improve the precision of click boundaries.

This tool has a "block size" parameter, which is supposed to be the minimum separation of centers of clicks. You don't want that less than the period of the fundamental of the voice, or else false clicks might be detected in every cycle, especially in "vocal fry."

For now, labelled clicks are always exactly that wide and with boundaries at multiples of one half block size. As I mentioned before, the centering of the real click in the label boundaries (or even the detection of the click), and hence the quality of the crossfaded fix, depend a bit too much on accidents of the selection boundaries. While I don't think refinement to the sample time is worth the computation, I should figure out how to vary the step size to values less than half the block size.
Attachments
DeClicker.ny
(11.08 KiB) Downloaded 187 times

Paul L
Posts: 1788
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Re: Automatic removal of mouth smacks

Post by Paul L » Thu Oct 24, 2013 7:06 pm

I see a couple downloads. Any comments? Another iteration is in the works.

Audacity's own Repair is a manual defect remover, which treats some of the things I want to remove, but it doesn't automate over minutes of sound.

How much of what I want to do might be done by Click Removal?

Paul L
Posts: 1788
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Re: Automatic removal of mouth smacks

Post by Paul L » Fri Oct 25, 2013 3:24 am

Experiments with Click Removal at various levels of sensitivity suggest that it is not suited for my needs.

I zoom in on places where the waveform changes, and in waveform (Not DB) view, it is evident that certain small peaks just get chopped off with a linear interpolation of samples. This is not frequency filtering.

What does Repair do? I'm not sure what mathematically but it isn't so simple. But it is not suited for blanket treatment of a track.

Enough to convince me that what I am developing is not duplicating a wheel, at least none packaged with Audacity.

I am not developing this for purposes of cleanup of captures from radio or tape or vinyl, but perhaps it will be suited for that too. Maybe one of you will try it. waxcylinder?

waxcylinder
Forum Staff
Posts: 14669
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Automatic removal of mouth smacks

Post by waxcylinder » Fri Oct 25, 2013 8:40 am

Paul L wrote:I am not developing this for purposes of cleanup of captures from radio or tape or vinyl, but perhaps it will be suited for that too. Maybe one of you will try it. waxcylinder?
Yes I can give it a spin - I'm shortly to de-commission my turntable (as I've finished all my and my wife's vinyl transfers). But before I do that I'll make a couple of captures from a couple of my 45s - and they have had a very hard life.

Have you tried Brian Davies' ClickRepair, he gives a 21-day free trial so you can experiment a bit for free. I would recommend setting the "Reversed" processing: http://www.clickrepair.net/software_inf ... epair.html
I'd be interested in hearing if this s/w does the trick on your "mouth smacks".

WC
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Trebor
Posts: 9901
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Automatic removal of mouth smacks

Post by Trebor » Fri Oct 25, 2013 10:07 am

Paul L wrote:Here's an update ...
Attachments DeClicker.ny (11.08 KiB)
Just been playing around with that for a few minutes with that, and these settings work for me ...
settings which work for me 131025.png
NB: I've only been experimenting with this plugin for a few minutes
settings which work for me 131025.png (16.11 KiB) Viewed 3463 times
before-after  ''Paul L'' DeClicker.gif
Definite improvement , (but some artefacts created)
before-after ''Paul L'' DeClicker.gif (30.93 KiB) Viewed 3463 times
[ this plugin did crash Audacity a couple of times when I tried using extreme settings ]

waxcylinder
Forum Staff
Posts: 14669
Joined: Tue Jul 31, 2007 11:03 am
Operating System: Windows 10

Re: Automatic removal of mouth smacks

Post by waxcylinder » Fri Oct 25, 2013 3:05 pm

@Paul: Ok I tried tour DeClicker (you made it hard for me to spot it the Effects list as it's not called DeClicker there :) )

I tried it with your default settings and with Trebor's settings - it made some dent in the clicks on an old 45 but nowhere near enough - and certainly nothing like as good as Brian Davies' ClickRepair.

The progress dialog is wildly inaccurate in terms of its elapsed and remaining times - plus the progress bar gallops to the 50% mark sits there for a long time (with the timer counts static) and then suddenly gallops to the end.

To me its looks a fearsomely complex GUI with non-obvious parameters to set - and I speak here as one of the documenters of Audacity 8-)

Let me know if you produce an update you would like me to try.

Peter
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * *

Paul L
Posts: 1788
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Re: Automatic removal of mouth smacks

Post by Paul L » Fri Oct 25, 2013 5:06 pm

Trebor, are you also removing LP noise? Try increasing crossfade percentage to avoid artifacts.

waxcylinder, maybe raising the floor of frequencies to check would reduce the time and make progress more meaningful.

I don't pretend that this is a finished project. There will be more updates. FIxing LP captures may be beside my purposes but it is nice to know if it is useful.

One problem I am aware of is that it detects intervals containing clicks, but all repair intervals are the same width and not always well centered on the click. More crossfading might give a less satisfactory fix if the centering is bad, though it reduces artifacts.

Try increasing iterations for more aggressive fixes, and try "biquad" (I will rename those dropdown options) for more robust fixing despite badly centered labels.

Have you tried the labelling feature? It can find clicks without doing anything to them. It indicates in the label the range of frequencies that are clicky.

Trebor
Posts: 9901
Joined: Sat Dec 27, 2008 5:22 pm
Operating System: Windows 8 or 8.1

Re: Automatic removal of mouth smacks

Post by Trebor » Fri Oct 25, 2013 5:24 pm

Paul L wrote:Trebor, are you also removing LP noise?
Not LP, the click example I posted was a voice recording posted on this forum , ( it could be lip-smacking or a stuck mic-diaphragm freeing itself with a click). Using your plugin on the settings I posted reduced those type of clicks almost completely. I'll give it some more trial and error to see if I can improve on those settings.

[ I had an idea to de-click via processing the differentiated waveform : It does make the clicks more obvious ]

Paul L
Posts: 1788
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Re: Automatic removal of mouth smacks

Post by Paul L » Fri Oct 25, 2013 5:29 pm

Tell me too whether the tool worsens the sound more than it improves it.

Post Reply