Improved "leveling" for speech

Archive of Nyquist Plug-ins.
Many of the plug-ins here will be available on the Audacity Wiki.

This Forum is an archive of old topics concerning Nyquist plug-ins.

Feedback and questions relating to topics may be posted, but please
DO NOT POST NEW TOPICS HERE.

New plug-ins may be posted on the New Plug-Ins board.
Other posts relating to Nyquist should be posted to the main Nyquist board.

The main repository for Audacity/Nyquist Plug-ins is on the Audacity Wiki.

Re: Improved "leveling" for speech

Permanent link to this post Posted by steve » Mon Nov 30, 2015 7:33 pm

quake004 wrote:I tried the level speech plug-in with this audio. I used the -36 threshold and heaviest degree of leveling.

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 (http://manual.audacityteam.org/o/man/leveler.html), then I agree that the results sound terrible.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45045
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Improved "leveling" for speech

Permanent link to this post Posted by quake004 » Mon Nov 30, 2015 9:22 pm

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?
quake004
 
Posts: 3
Joined: Wed Nov 25, 2015 7:45 am
Operating System: Please select

Re: Improved "leveling" for speech

Permanent link to this post Posted by steve » Mon Nov 30, 2015 10:30 pm

quake004 wrote:That worked like a charm, thanks. I have a doubt because I put the threshold pretty random.

I don't know what you mean. The "latest version" of the "Level Speech" effect does not have a "threshold" setting.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45045
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Improved "leveling" for speech

Permanent link to this post Posted by kozikowski » Fri Nov 10, 2017 3:45 am

Which rev is this?

Koz


Code: Select all
;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))))))
kozikowski
Forum Staff
 
Posts: 38253
Joined: Thu Aug 02, 2007 5:57 pm
Location: Los Angeles
Operating System: OS X 10.9 Mavericks

Re: Improved "leveling" for speech

Permanent link to this post Posted by steve » Fri Nov 10, 2017 4:23 am

kozikowski wrote:Which rev is this?

Without downloading and comparing every download in the topic, I've no idea, but this is the "latest version": https://forum.audacityteam.org/download ... hp?id=9658
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45045
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Improved "leveling" for speech

Permanent link to this post Posted by steve » Mon Nov 13, 2017 3:42 pm

This plug-in is now available on the wiki: http://wiki.audacityteam.org/wiki/Nyqui ... vel_Speech
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45045
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Previous

Return to Plug-in Archive



Who is online

Users browsing this forum: No registered users and 2 guests