Improved "leveling" for speech

I think that you may be describing the wrong effect. The latest version of the “LevelSpeech.ny” plug-in from this post does not have a “threshold” setting. If you are referring to the “Leveler” effect (Audacity Manual), then I agree that the results sound terrible.

That worked like a charm, thanks. I have a doubt because I put the threshold pretty random. There is a green bar with a lighter and a darker part for the output level. Let’s say the lighter green bar for the quiet voice goes from -36 to -24 then I should select a little below the minimum which would be -38 or so right?

I don’t know what you mean. The “latest version” of the “Level Speech” effect does not have a “threshold” setting.

Which rev is this?

Koz


;nyquist plug-in
;version 3
;type process
;name "Level Speech..."
;action "Leveling speech dynamics..."

;; LevelSpeech.ny by Steve Daulton (www.easyspacepro.com). March 2014
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

;control ratio "Leveling amount (%)" real "" 50 0 100
;control threshold "Threshold (dB)" real "" -25 -50 0

(setq ratio (min 1 (max 0 (/ ratio 100))))
(setq ratio (power ratio (/ 12.0)))
(setq threshold (db-to-linear (min 0 threshold)))

(defun get-env (sig)
  (let* ((sr (snd-srate sig))
         (risetime 0.5)   ; seconds
         (falltime 1.0)  ; seconds
         (lookahead (truncate (* risetime sr)))
         (env (snd-follow sig threshold risetime falltime lookahead))
         ; prevent boost at end of selection
         (env (sim env (snd-const 1 dur sr 1)))
         (env (extract-abs (+ risetime (/ 20 sr)) (+ risetime (/ 20 sr) dur) env))
         (env (sum (- 1 ratio)(mult ratio env)))
         (env (snd-exp (diff 0 (snd-log env)))))
    env))

;; absolute maximum signal
(defun max-sig (sig)
  (if (arrayp sig)
      (s-max (snd-abs (aref sig 0))(snd-abs (aref sig 1)))
      (snd-abs sig)))

;;; brick wall limiter
(defun limit (s-in)   
  (let* ((la-time (/ 300.0))                      ; lookahead time (seconds)
         (la-s (round (* la-time *sound-srate*))) ; lookahead samples
         (pad-time (* 3 la-time))                 ; padding required at start (s)
         (pad-s (* 3 la-s))                       ; padding smaples
         (padding (snd-const (peak s-in pad-s) 0 *sound-srate* (* 3.0 la-time)))
         (peak-env (snd-avg s-in (* 4 la-s) la-s OP-PEAK))
         (peak-env (sim padding (at-abs pad-time (cue peak-env))))
         (peak-env (extract 0 1 (s-max 1 peak-env))))
    (mult s-in
      (snd-exp 
        (mult -1 (snd-log peak-env))))))

(setq dur (get-duration 1))

(cond
  ((< dur 2) "Error.\nSelection must be at least 2 seconds.")
  (t (let ((s (multichan-expand #'limit s)))
       (mult 0.99 s (get-env (max-sig s))))))

Without downloading and comparing every download in the topic, I’ve no idea, but this is the “latest version”: https://forum.audacityteam.org/download/file.php?id=9658

This plug-in is now available on the wiki: http://wiki.audacityteam.org/wiki/Nyquist_Effect_Plug-ins#Level_Speech

The current version of LevelSpeech has …

         (risetime 0.5)   ; seconds
         (falltime 1.0)  ; seconds

If you change these to …

         (risetime 0.02)   ; seconds
         (falltime 0.10)  ; seconds

It responds quicker : the changes in gain are less obvious, less pumping/breathing,
e.g. attached
LevelSpeech2.NY (2.55 KB)

1 Like
Tutorial for adding Nyquist Plugin Effects
How to make a MP3 track to gain its DB level evenly?
Normalize and Compress?
Help with fixing noise
Screen Recording & Mobile Phone Recording
Normalising sound (for ACX)/order
Process with Compressor or Limiter?
Evening out volume
Restoring an old tape
Podcast improvement
How Do I Limit Spikes and Raise Volume of a Podcast
Broken audio
increase volume in parts of speech recording?
I Really Need Help Fixing My Audacity Recording
Voix trop faibles dans une conversation
Улучшение записи телефонного разговора
New to Podcasting
Even Up words in speech
Newcomer question about working with multiple tracks
Fixing "Peaking" Audio In Audacity?
How to record phone call - other side speech is NOT recorded?
Normalizing across sentences
My poor attempts to equalise a file
My poor attempts to equalise a file
How to balance recording en-mass
Audio critique? It sounds like I'm talking in a box.
Problem with USB Microphone and Laptop recording
leveling voices
Almost at finish line?
Automatic Gain Control on Recording? (Autosave?)
ALC / AGC & Dealing with poor VOIP quality
Equal volume across a long track of backing music
help fixing this audio quality
Getting my Voice in Videos for YouTube loud enough
Volume is even in all three tracks... until I export
Fixin' it in the mix... variable volume, spoken word
The many years problem with Chris Compressor
Leveling voice recordings from online platforms
Audio flat and muffled, is there a way to fix?
rms compressor acting strange
rms compressor acting strange
Cleaning up a conversation...
Podcast Audio Level Editing
Enhancing voice recording's volume
Making One Voice Louder
Help me fixing this audio file please
A vicious circle with sibilants
Low frequency noise - is this normal?
Mastered FM radio compressor preset
Recorded conversation adjustment.
Audacity editing process help
How can I make a long voice over track all be around the same volume?
Any audio tips
Any audio tips
Improve TCI session audio quality with Audacity
Improve TCI session audio quality with Audacity
#3 Volume post
Envelope tool vs Effect -> Amplify, vs Compression for interviews...
Plugins de atenuar reverbação
Advice on settings/plug ins/strategy to ideally process spoken word from tapes
Small Waveforms
Default Compressor Settings
Increase volume only of of low-volume parts of the audio, while keeping high-volume parts as-is
How to fix volume of two people talking?
Effects or Plugins for Improving First Part of Uploaded Recording
Shaving Luf Hills and Raising Luf Valleys
Installed LevelSpeech.ny, but can't find it in the menus
Request Insight: Nyquist Prompt + "Amplify" tool to piecewise amplify 1ms segments to 1dB?
Séparation de voix
Evening out uneven interview audio without compression
Improving Poorly Recorded Audio: Seeking Advice on Voice Clarity Enhancement
Fichier audio inaudible ou partiellement
How to acheive the same volume on all of my commentaries?
Radio
Radio
recording a converstion
In recording of a SNS chat, voice from MIC is very low
Compressor Causing Low Volume at Beginning of Sentences

I found Levelspeech.ny OK. But clicking on “download” only gets me a notepad text. no .exe file. I’m obviously missing something, but what? Otherwise, this plug-in seems to be what I’m looking for.

Thanks,
Sync45

Nyquist Plug-ins are plain text files, but unlike a normal plain text file, they should NOT have the file name extension “.txt”, they should have the file name extension “.ny”. That “notepad text” file is the plug-in.

If your web browser adds “.txt” to the file name (Safari web browser on Mac is known to do this), then you should change the name back to it’s correct name. For example, if the download says “Levelspeech.ny”, then the name of the download should be “Levelspeech.ny”. If however your web browser changes the name to “Levelspeech.ny.txt”, then you should change it back to “Levelspeech.ny”.

Thanks very much. The installation wasn’t straight-forward; there was a learning curve and some intuition required. But I got it installed and working. This is a fantastic tool. Just what the doctor ordered!

Best regards and thanks again,
Sync45

Can it normalize stereo channels independently?

Split the track, apply the effect, then join the channels back into a stereo track (See: Splitting and Joining Stereo Tracks - Audacity Manual)