Adding silent space every 30 seconds over 45 min MP3


I have audacity v 2.0.3 running on Win7 64 bit.

I have generated silent space on a 45 minute MP3 recording so that I have 30 seconds of talking and 25 seconds of space all the way through the recording = fantastic!!

What I need to know is - is there a way to automatically add the silent space at 30 second invals?

It took me just under an hour to add the space - I have 38 recordings to transcribe so it would be helpful if I could just overlay a 25 second silent space every 30 seconds.

Thank you

If you computer has sufficient free ram then it should be possible by running this code in the Nyquist Prompt effect.
Note that this is dumb code - it has no error checking, and it does not know where words start or end so the gaps will be placed at the exact intervals that you specify.

To use the code, select the track (or part of it) and then open the Nyquist Prompt from the effect menu. Then copy/paste this code into the Nyquist Prompt text box:

(setq sec-audio 30.0) ; number of seconds of audio
(setq sec-silence 25.0) ; number of seconds of silence

(defun spread (sig adur sildur)
  (let ((dur (get-duration 1))
        (new-dur (get-duration (1+ (/ sildur adur)))))
    (do ((new-s (abs-env (s-rest new-dur)))
         (pos 0 (+ pos adur sildur))
         (start 0 (+ start adur))
         (end adur (+ end adur)))
        ((>= start dur) new-s)
      (setf new-s
        (sim new-s
          (at-abs pos (cue (extract-abs start end sig))))))))

(multichan-expand #'spread s
                    (float sec-audio)
                    (float sec-silence))

As you will probably guess, the first two lines specify the duration of each audio section and the duration of each silence.
If your computer does not have enough free ram then Audacity will probably crash, so make sure that you have everything backed up before you use it.


Thank you so much, it works a treat and only takes around 2 minutes.

You don’t know how easy you just made 40 hours of transcription become :smiley:



It occurred to me that as you are transcribing and words may be cut off in the middle, it might be useful if there was a little overlap between each of the audio sections.
So if you had:
“The quick brown fox jumped ov// split //er the lazy dog”
You can now have:
“The quick brown fox jumped ov// split //umped over the lazy dog”

The amount of overlap is set in the third line (currently set to 3 seconds, but change it if you wish)

(setq sec-audio 30)   ; number of seconds of audio
(setq sec-silence 25) ; number of seconds of silence
(setq overlap 3)      ; number of seconds overlap

(defun spread (sig adur sildur olap)
  (let* ((dur (get-duration 1))
         (sections (/ (- dur olap) adur))
         (audiolen (+ (* (- sections 2)(+ adur olap))(* 2 adur)))
         (sillen (* (1- sections) sildur))
         (new-dur (+ audiolen sillen)))
    (do ((new-s (abs-env (s-rest new-dur)))
         (pos 0 (+ pos adur olap sildur))
         (start 0 (+ start adur))
         (end (+ adur olap) (+ end adur)))
        ((>= start dur) new-s)
      (setf new-s
        (sim new-s
          (at-abs pos (cue (extract-abs start end sig))))))))

(multichan-expand #'spread s 
                           (float (- sec-audio overlap))
                           (float sec-silence)
                           (float overlap))

Is this a common task when transcribing?
If it is, then I could easily make this into a plug-in so that you have sliders to set the various durations.

Is the additional “overlap” feature useful?

Hi Steve,

Yes you are right there is some splitting of the words which makes it difficult to follow.

The 3 second overlay is perfect.

Yes, there is a great need for this when transcribing, a plug in would be very helpful for many.

When I was searching for a program to transcribe, audacity did not appear in my search. My son said it was a good program, and to use it. Initally I was hoping to slow the speech down so I could just keep up while I was typing, but the sound was then distorted so much that i could not understand what they were saying. Then I searched how to add in the silent parts which I think is faster than listening to slowed speech.

The solutions you have given me are excellent for transcribing.

Thank you very very much

Kind regards


I’ve made it into a plug-in. It is available here:

Please try this plug-in and let me know (by replying to that topic) if it works OK or if you have any suggestions for improvement.

One improvement that comes to my mind is for the plug-in to look for the quiet sections between words and insert the silence at the quiet section closest to the interval period, thus (mostly) avoiding splitting words.