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
Post Reply
Paul L
Posts: 1785
Joined: Mon Mar 11, 2013 7:37 pm
Operating System: Please select

Automatic removal of mouth smacks

Post by Paul L » Mon Oct 21, 2013 3:35 am

Does anyone know of a plugin that does a good job of removing mouth smacks from recorded voice?

If not I was wondering how I might write such a thing.

Problems would be first identifying clicks, which are typically 5ms or less, and then repairing them. I have some untested ideas for both.

Deletion of clicks is something I do by hand but would be hard to program. It might be less useful when synchronization with other tracks is important. Would lowpass or band stop applied to very short regions work well enough?

kozikowski
Forum Staff
Posts: 69245
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Automatic removal of mouth smacks

Post by kozikowski » Mon Oct 21, 2013 5:21 am

In general, if you didn't start out being a presenter/announcer, it's rough to get there with filters, effects and editorial. As you found out, you can't just slice out the offending sounds, you have to put something back in order to maintain the length of the performance. Whatever you put back has to be not worse than the original problem.

There was another presenter a while ago with this problem. I think he just threw in the towel and put up with the clicks.

There is a magic trick you can try.

Save your clicks in a file and use that as the Noise Removal Profile step. Be absolutely certain not to include any valuable voice in this clip. Just click after click. It's remotely possible that if you play your cards right and the moons and starts line up, most of the worst of the staccato clicks can be made to soften with the second application of Noise Reduction. It's also possible that it will destroy the show. It's impossible to tell.

If you're not familiar with Noise Removal, it works in two steps. Select some of the offending noise and use that as the profile step. In essence, letting the tool "taste" the problem. Then run the tool again and apply it to the show. It will try to remove the profile sound from the show.

http://manual.audacityteam.org/o/man/noise_removal.html

Koz

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

Re: Automatic removal of mouth smacks

Post by Paul L » Mon Oct 21, 2013 5:36 am

That does not sound very hopeful.

I edit narration and synchronization with other tracks is not a concern, so I often just slice clicks out. I can get very clean results but it is tedious. If you slice a bit of a vowel out, you must zoom in and take out exactly one cycle of the vowel waveform or else you get a "bump" where there was once a click. If I want to automate that procedure, I suppose I need the Nyquist yin function to guess the fundamental.

kozikowski
Forum Staff
Posts: 69245
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Automatic removal of mouth smacks

Post by kozikowski » Mon Oct 21, 2013 5:53 am

Edit > Find Zero Crossings.

Noise Reduction may work for you and it's already written.

The Nyquist elves will be along.

Koz

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

Re: Automatic removal of mouth smacks

Post by Paul L » Mon Oct 21, 2013 6:21 am

It takes more than Find Zero crossings to cut out a cycle of a vowel. A vowel waveform makes many zero crossings.

I tried noise reduction a few times a while ago and came to mistrust it. I don't really understand how it works. It changed the timbre of leftover sounds. Now perhaps there was too much noise in my recording environment which I have improved since then.

But using it to remove clicks? Have you tried that with success?

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

Re: Automatic removal of mouth smacks

Post by Paul L » Mon Oct 21, 2013 6:31 am

The typical click is 5 ms or less. They are often easily seen in spectrogram view as a bright and narrow vertical stripe. If I were to attempt the detection problem, it would go something like this:

Convolve with a single cycle of a sine wave at a certain frequency. Apply snd-avg with OP-PEAK and a window of 10 ms and a skip of 5 ms. Identify windows in which the amplitude is more than a certain percentage of the amplitudes in the neighboring, nonoverlapping windows. The window triples I examine would be staggered by a half window, so I would not miss a click near a window boundary. It would also be centered in another window.

Repeat for several frequencies.

snd-fft essentially computes several convolutions at once, but it might be faster just to convolve a few frequencies, say 500Hz to 8kHz stepping by 500.

Am I making sense?
Last edited by Paul L on Mon Oct 21, 2013 6:44 am, edited 1 time in total.

kozikowski
Forum Staff
Posts: 69245
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Automatic removal of mouth smacks

Post by kozikowski » Mon Oct 21, 2013 6:35 am

Am I making sense?
Perhaps to the Nyquist elves who aren't here yet. I believe it's 06:00 their time.
Koz

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

Re: Automatic removal of mouth smacks

Post by waxcylinder » Mon Oct 21, 2013 8:24 am

Have you thought of trying Brian Davies' ClickRepair software for the "mouth snacks", although it's primarily designed to deal with the pops and clicks on LPs but from the way you describe how they look in spectrogram view then there's a reasonable chance that CR might work for you here.

I's not free software ($40) but Brian let's you have a 14-day free-trial so you try it out first to see if it works.

I would recommend setting the reverse processing mode and I soften the de-click setting from 50 to 30 - and set the "pitch protection option.

See: http://www.clickrepair.net/software_inf ... epair.html

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

steve
Site Admin
Posts: 81291
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Automatic removal of mouth smacks

Post by steve » Mon Oct 21, 2013 9:57 am

Paul L wrote:Problems would be first identifying clicks, which are typically 5ms or less, and then repairing them. I have some untested ideas for both.
I think that identifying the clicks would be the hardest part. Can your phoneme analyser help with that? http://forum.audacityteam.org/viewtopic ... 20#p211220

There are several easy techniques for reducing mouth smack (and other) clicks.

One approach is to use a low pass filter, but in order to avoid creating clicks at the start/end of the repair it is necessary to have a short transition period between the original and the repaired section. It is not sufficient to just set the start and end at zero crossing points.
Commented example:

Code: Select all

; sweep filter frequency range in Hz
(setq nyqf (/ *sound-srate* 2)) ; Nyquist frequency
(setq lowf 2000) ; lowest frequency of the the sweep
(setq iter 4)

; one cycle of a sine wave the same duration as the selection.
(setf sine (osc (hz-to-step (/ (get-duration 1)))
                1 *sine-table* 90))
; make amplitude 0 to 1
(setf sine (mult 0.5 (sum 1 sine)))
; make amplitude lowf to nyqf
(setf frq-env (sum lowf (mult sine (- nyqf lowf))))

;; Envelopes to make very short crossfade.
(control-srate-abs *sound-srate*
  (progn
    (setf filt-env (pwlv 0 0.05 1 0.95 1 1 0))
    (setf fade-env (pwlv 1 0.05 0 0.95 0 1 1))))

(setf s1 s)

;; Filter s1
(dotimes (i iter)
  (setf s1 (lp s1 frq-env)))

;; Crossfade
(sum (mult s fade-env)
     (mult s1 filt-env))
Another approach, specifically for clicks during "silence" is to patch over the click with a bit of "room tone", which we discussed in these topics:
http://forum.audacityteam.org/viewtopic ... 56&t=71453
http://forum.audacityteam.org/viewtopic ... 42&t=71556
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Automatic removal of mouth smacks

Post by waxcylinder » Mon Oct 21, 2013 10:55 am

Paul L wrote:I tried noise reduction a few times a while ago and came to mistrust it. I don't really understand how it works. It changed the timbre of leftover sounds.
Well you sent me off on a little experimental journey there Paul ...

I've habitually used Noise Removal (default settings) on FM broadcasts to remove the FM hiss. So following your comments I took a capture I made from BBC R4 on Saturday an listened carefully on my studio Sennheiser cans. Obviously wthout NR I still get the FM hiss - but you're right the NR does seem to change the sound - you can't hear it so much when the vocalist (with a big voice - Mary Coughlan) sings, but on the quiet electric piano intro you can really hear some strange tinkly artefacts. The question is, which do I prefer - D'OH !!! :? :roll:

P.S. Both recordings uncompressed audio of course 8-)

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

Post Reply