First of all, as you may know, I’m a blind user who can’t use the mouse at all for editing jobs in Audacity. So any of the tools are out of the question for me.
So I have a recording of a livestream I recorded with the Windows Wasapi Loopback, but there are momentary spots where there is dead silence. I can solve the problem manually, but I’d rather not do that because it’s time-consuming. Here’s what I did.
I selected each part where one of those “chops” occurs, run “Trim Silence” and the threshold was set to -500, or infinitely silent. It did the job, but having to select super short samples that I can’t react to in time is just not possible to do by hand.
Then I looked on the forum for ways to do this and I found two suggestions. One was “Silence Finder”, and I did that. When I deleted the labeled audio, it didn’t change at all, even though I selected -500 as the silence level. Then I found a suggestion to Detach at Silences. When i did this too, the audio did not change at all, even after doing a Join. I guess there must be a mouse step involved? If so, why are you excluding blind people from this?
So, I was thinking of a plugin that would work like “Trim Silence”, but it would trim everything. Basically a .NY version of Truncate Silence. However, what I dislike about Truncate Silence is that you are limited to -80 DB, and I recorded in 32 bit with a very wide dynamic range. So Truncate Silence is also out of the question for me.
After looking at Trim Silence, it would seem that all that needs to be done is to delete some code so that it just clears the dead white silences. But what to delete?
Again, I can’t just simply select portions of it and then trim silence manually as it would take forever, and again Detach at Silences followed by a Join doesn’t work at all. Other than this plugin, I have no other options.
So, can I request some help with this please? I think it should also be included on the Nyquist Effect plugins. I’ve attached the code for Trim Silence so we’re on the same page as to what I’m using as a plugin. Also, I do not mind the audio having to be loaded into Ram.
;nyquist plug-in ;version 3 ;type process ;categories "http://lv2plug.in/ns/lv2core/#UtilityPlugin" ;name "Trim Silence..." ;action "Trimming..." ;info "by Steve Daulton (http://www.easyspacepro.com). Released under GPL v2.\n\nTrims silence from the beginning and end of the selection.\n" ;control thresh "Silence Threshold (dB)" real "" -300 -500 0 ;; TrimSilence.ny by Steve Daulton. Aug 2011. ;; Updated 24 Sept 2012. ;; Released under terms of the GNU General Public License version 2: ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html ;; Requires Audacity 1.3.8 or later. ;; RAM USAGE: ;; This plug-in requires the audio to be loaded into RAM. ;; If there is insufficient free RAM Audacity may freeze or crash. ;; The line below limits RAM usage to 1.0 GB (about 47 minutes for ;; a stereo track at 44.1 kHz) ;; If your computer has more than 1GB of physical RAM available, the ;; limit may be increased. (setq RAM-Limit 2.0) ; RAM limit in GB ; convert threhold to linear (setq thresh (db-to-linear (min 0 thresh))) ;; Limit of duration in seconds (setq limit (/ (* ram-limit 1000000000) (* 4.0 *sound-srate*))) (when (arrayp s)(setq limit (/ limit 2.0))) ;;; modulo (defun mod (x y) (setq y (float y)) (round (* y (- (/ x y) (truncate (/ x y)))))) ;;; convert to hh:mm:ss (defun to-hhmmss (seconds) (let* ((hh (truncate (/ seconds 3600))) (mm (truncate (/ (mod seconds 3600) 60))) (ss (mod seconds 60))) (format nil "~ah:~am:~as" hh mm ss))) ;;; convert to mono and limit sample rate (defun convert (sig ratio) (if (arrayp s) (snd-avg (s-max (snd-abs (aref sig 0)) (snd-abs (aref sig 1))) ratio ratio op-peak) (snd-avg sig ratio ratio op-peak))) ;;; find silences (defun find-sil (sig &aux (start 0)(end 0)) (do ((new (snd-fetch sig) (snd-fetch sig)) (flag 0)) ((not new)) (if (= flag 0) ;; count initial silence (if (<= new thresh) (setq start (1+ start)) (setq flag 1)) ;; count final silence (if (<= new thresh) (setq end (1+ end)) (setq end 0)))) (list start end)) (if (< len (* limit *sound-srate*)) ;max length in samples (let* ((start 0) (end 0) (flag 0) ;; ratio provides tighter trimming for short selections ;; while maintaining reasonable speed for long selections (ratio (max 1 (min 0 (round (/ len 1.0))))) (my-srate (/ *sound-srate* ratio)) (mysound (convert s ratio))) ;loop through samples and mark start and end (setf result (find-sil mysound)) (let ((start (/ (first result) my-srate)) (end (- (get-duration 1)(/ (second result) my-srate)))) ;; ensure at least 1 sample remains (if (>= start (get-duration 1)) (setq start (/ (1- len) *sound-srate*))) ; trim (multichan-expand #'extract-abs start end (cue s)))) ;; OR print error message (format nil "Error.\nMax RAM usage by Trim Silence is set to ~a GB.~%This allows a maximum duration ~ for a ~a~%track at ~a Hz of ~a.~%Selected track is ~a.~%" RAM-limit (if (arrayp s) "stereo" "mono") (round *sound-srate*) (to-hhmmss limit) (to-hhmmss (get-duration 1))))
So all I want to change is for it to just delete all the silences, not just the beginning or end only. Again, I’m not happy with Truncate Silence and want tighter trimming right down to the sample level. So can anybody please help me with this? Thanks,
PS. I’ve tried my best to make sense. Among the forums I’ve read where people are trying to resolve this, a lot of people have a hard time trying to grasp what they’re saying. But being an audio expert, hopefully I was clear about this.