Extend Silences

Share your Audacity/Nyquist plug-ins here, or test drive the latest plug-ins submitted by Audacity users.

After testing a plug-in from this forum, please post feedback for the plug-in author.
uvhwpevx
Posts: 14
Joined: Thu Aug 06, 2015 9:11 am
Operating System: Please select

Re: Extend Silences

Post by uvhwpevx » Sat Aug 08, 2015 7:06 pm

steve wrote: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 amount of silence inserted may be defined in three ways:
  1. As an absolute length (in seconds).
  2. As a proportion of the length of the detected silence.
  3. As a proportion of the length of the preceding sound.
Thinking about language tutorial patterns like "Native sentence - Pause - Foreign translation" or "Question - Pause - Answer", the fourth way to stretch the pauses have to be here:
  • The amount of silence inserted as a proportion of the length of the answer, that sounds after the silent pause.

Gale Andrews
Quality Assurance
Posts: 25981
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Extend Silences

Post by Gale Andrews » Mon Oct 26, 2015 8:57 pm

When we have decided on the desired features, I propose this as the next plugin to be promoted to http://wiki.audacityteam.org/wiki/Downl ... t_Plug-ins. Then we would have a logical group Extend Silence, Trim / Extend, Trim Silence.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

sdubois
Posts: 1
Joined: Wed Sep 13, 2017 10:20 am
Operating System: OS X 10.11 El Capitan or later (macOS)

Re: Extend Silences

Post by sdubois » Wed Sep 13, 2017 11:10 am

This is fun, thanks! I experimented with it to extend guided meditation sessions. In my case and for this speaker and recording setup, good thresholds seem to be -60 dB and a min detected silence of at least 5 seconds (not to introduce weird silences in the middle of sentences). To extend a 10 min session into 20 min, I then extend the silence by 100% of its own length + 100% of the preceding sound.

However:
- I have various silences which can't be reliably auto detected by thresholds and then need to move silences around manually. Being able to specify the silence locations by a series of labels in order to apply the effect automatically based on them, could be useful. Alternately, I need to place my labels then make sure that there is indeed a gap of 5 seconds between them (and none within), before applying the effect.
- the plugin doesn't allow a min detected silence of more than 10 seconds, nor a % of detected silence or a % of previous sound of more than 100%, although such values would be valid. (I guess I could fix this for myself by editing the script, but this should probably be fixed before being offered as a standard.)
- the progress bar doesn't estimate correctly how long the effect will take to apply (gets to 100% then waits several more seconds before finishing)

steve
Site Admin
Posts: 49443
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Extend Silences

Post by steve » Mon Sep 25, 2017 4:54 pm

sdubois wrote:Being able to specify the silence locations by a series of labels in order to apply the effect automatically based on them, could be useful.
Unfortunately Nyquist plug-ins do not (yet) have the ability to read labels.

sdubois wrote:the plugin doesn't allow a min detected silence of more than 10 seconds,
You could modify the plug-in by opening it in a plain text editor (for example: NotePad++) and change the line:

Code: Select all

;control min-dur "Min detected silence (seconds)" real "" 1 0.1 10.1
to something like:

Code: Select all

;control min-dur "Min detected silence (seconds)" real "" 1 0.1 60
This increases the maximum setting of "Min detected silences (seconds)" to 60 (1 minute). The three numbers at the end are: "default" (1 second), "minimum value" (0.1 second), "maximum value" (60 seconds).
sdubois wrote:the progress bar doesn't estimate correctly how long the effect will take to apply (gets to 100% then waits several more seconds before finishing)
Unfortunately I don't think that can be fixed, at least, not without some major changes to how Audacity implements Nyquist plug-ins. The plug-in code itself runs very quickly, as is shown by the progress bar, but all that the plug-in does is to calculate where and how much silence to add. Audacity then needs to copy the entire audio data into RAM, insert the silences, write the resulting audio to disk and redraw the waveform. It's this latter part that takes the time, but that all occurs outside of the progress loop that is being timed.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Dashakol
Posts: 15
Joined: Tue May 22, 2018 4:23 am
Operating System: Windows 8 or 8.1

Add silence more than 100% of previous sound duration

Post by Dashakol » Tue May 22, 2018 4:40 am

Hi,
First let me thank you for such a useful plug-in. Actually I first searched and came across your plug-in and then installed Audacity only to use this plug-in. 8-)
I want to add silence more than 100% of previous sound duration. How should I edit the code to remove or increase that maximum? Not sure if this is the answer:
viewtopic.php?p=282759#p282759

Thanks

steve
Site Admin
Posts: 49443
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Extend Silences

Post by steve » Tue May 22, 2018 7:17 am

Dashakol wrote:I want to add silence more than 100% of previous sound duration. How should I edit the code to remove or increase that maximum?
Firstly, it is essential that a "plain text" editor is used when editing Nyquist plug-ins. On Windows, NotePad++ is ideal.

To increase the available % range from "0 to 100" to "0 to 200", find this line (line 19):

Code: Select all

;control add-sil-pc "Add % of detected silence duration" real "" 0 0 100
and change it to:

Code: Select all

;control add-sil-pc "Add % of detected silence duration" real "" 0 0 200
The three numbers at the end of that line are: default, minimum, maximum.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Dashakol
Posts: 15
Joined: Tue May 22, 2018 4:23 am
Operating System: Windows 8 or 8.1

Re: Extend Silences

Post by Dashakol » Tue May 22, 2018 1:29 pm

steve wrote:
Dashakol wrote:I want to add silence more than 100% of previous sound duration. How should I edit the code to remove or increase that maximum?
To increase the available % range from "0 to 100" to "0 to 200", find this line (line 19):

Code: Select all

;control add-sil-pc "Add % of detected silence duration" real "" 0 0 100
Thanks for the hint. Actually what I was looking for was the next line (line 20). In case any other one might have the same question:

Code: Select all

;control add-snd-pc "Add % of previous sound duration" real "" 0 0 100

Dashakol
Posts: 15
Joined: Tue May 22, 2018 4:23 am
Operating System: Windows 8 or 8.1

Feature request: Extend Silences by two threshold levels

Post by Dashakol » Tue May 22, 2018 3:04 pm

Let's assume several seconds of speaking in the audio won't go below the average silence threshold you've set. So no silence will be inserted in that part and that long chunk will be harder to listen and repeat. In such case if you set a higher threshold, the whole audio file will be divided into very short segments which is impractical.
It would be great if an option was added to "Extend silences" plug-in for setting a limiting duration and a higher second threshold. If sound segments get longer than that, then it'll search inside them for a higher silence threshold and this way segmenting them to shorter pieces like the rest of audio.

steve
Site Admin
Posts: 49443
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Extend Silences

Post by steve » Tue May 22, 2018 3:14 pm

Dashakol wrote:It would be great if an option was added to "Extend silences" plug-in for setting a limiting duration and a higher second threshold.
Select the part of the track where you want one lot of settings and apply, then select another region and apply with different settings.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Dashakol
Posts: 15
Joined: Tue May 22, 2018 4:23 am
Operating System: Windows 8 or 8.1

Re: Extend Silences

Post by Dashakol » Tue May 22, 2018 3:32 pm

steve wrote:
Dashakol wrote:It would be great if an option was added to "Extend silences" plug-in for setting a limiting duration and a higher second threshold.
Select the part of the track where you want one lot of settings and apply, then select another region and apply with different settings.
If you have several audios with several of those high threshold segments in them, manual scanning, selecting and running effect for each segment will take a very long time.

Post Reply