This plug-in was originally developed in response to a request for a way to "stretch" the pauses in a language tutorial recording so that the user has more time to repeat each phrase. The plug-in is not restricted to speech recordings - it may be used in any type of recording where there is a need to extend the silences within the recording.
The plug-in code has copious in-line comments that describe how the plug-in works.
To view the code, open the plug-in file ("ExtendSilence.ny") in a plain text editor (such as NotePad or the excellent NotePad++). For more information about Nyquist code, see: http://forum.audacityteam.org/viewtopic ... 39&t=77214
How it works:
The plug-in scans the selected track, looking for places where the audio level remains below a specified level (the "Threshold") for more than a specified period. These places are classified as "silences". The plug-in then extends each detected "silence" by inserting additional silence at the end of each detected silence.
The amount of silence inserted may be defined in three ways:
- As an absolute length (in seconds).
- As a proportion of the length of the detected silence.
- As a proportion of the length of the preceding sound.
For example, for a language tutorial CD, you may want to extend each "pause" by 50% of the length of the preceding phrase, plus 2 seconds. The resulting silence will then be:
{the length of the detected silence} + {50% of the length of the preceding phrase} + {2 seconds}
Controls:
- Threshold for silence (dB): [-100 to 0 dB. (default = -40 dB)]
The peak level needs to drop below this level to be counted as "silence". If there is background noise, the threshold will need to be raised to a higher (less negative) level. - Min detected silence (seconds): [0.1 to 10.1 seconds. (default = 1.0 seconds)]
If the audio remains below the Threshold level for at least this length of time, it will be classed as "silence". Set to a smaller number if you wish to extend short gaps, or to a larger number if you wish to extend only long silences.
Values greater than 10 seconds (up to 100 seconds) may be entered by typing into the text box. - Add silence duration (seconds) [0 to 10 seconds (default = 5.0 seconds)]
This extends each detected silence by the specified amount.
Values greater than 10 seconds (up to 100 seconds) may be entered by typing into the text box. - Add % of detected silence duration: [0 to 100 % (default = 0 %)]
This extends each detected silence by an amount equal to a specified percentage of the detected silence. For example, if the detected silence is 10 seconds duration and this control is set to 50%, then 5 seconds of silence will be added.
Values greater than 100 % (up to 1000 %) may be entered by typing into the text box. - Add % of previous sound duration: [0 to 100 % (default = 0 %)]
This extends each detected silence by an amount equal to a percentage of the duration of the preceding sound. For example, if there is a sound of 10 seconds duration before the detected silence, and this control is set to 50 %, then 5 seconds of silence will be added.
Note leading silence before the first sound will not be extended by this control because there is no preceding sound.
Values greater than 100 % (up to 1000 %) may be entered by typing into the text box.
Feedback and comments from plug-in users are an essential part of developing useful plug-ins.
For feedback, comments or questions, please post a reply to this topic.