Create a Customizable Profanity Filter

I wonder, how would I create a profanity filter which can be customized to type any words you want to filter out of a piece of audio. And it doesn’t have to be only limited to profanity. But what I mean is, you can type any words you deem questionable, which you can either filter with silence, a generic beep, or a sound effect, while still retaining the general background ambience like music or dialogue/soundtrack.

It would be a very tall-order to get Audacity to recognize words, even YouTube’s automatic subtitling has difficulties doing that.

If you are willing to locate the word yourself here’s a plugin which scratches it out … How to censor words using sound effects - #4 by Trebor