Is that the hack that I wrote?
I notice that it always inserts silence at the beginning, so that is probably a bug.
Yes, It’s from your post here at Jan 12, 2010.
Does it really make silence at the beginning?
Inserting silence at the beginning isn’t that an old story about the different ways of Audacity and Nyquist treating silence?
I remember that there is a plug in called “trim silence” cutting off silence from the start and the end of a selection.

Does it really make silence at the beginning?
Have you tried it?
What exactly are you wanting to do? What’s the job?
Steve the software hack you wrote is really great. I use it to had silences in my language lessons which speak to fast for me to repeat.
I have learned to speak a series of languages by listening to audiobooks, and repeating aloud in real time. To bootstrap listening comprehension I would 1) filter, to boost midrange vowel formants and high consonant bursts relative to the low vocal carrier wave, 2) compand, to boost the faint “rapid transitions” in and out of consonants relative to long steady state vowels, and 3) slow to 60-80% speed without altering pitch. (This really works. After reciting the Dragon trilogy in Swedish, I had my first very conversation with a Swede, who first thought I was Danish, then CIA.)
However, excessive slowing introduces artifacts and distorts the timing that distinguishes speech sounds. Language instructors instead recommend pauses between phrases at full speed. But adding arbitrary lengths of silence is mistimed. The holy grail for this application would be to mark each minimum length of sound between some minimum length of silence as a phrase, and append silence of the same length as that phrase. This would double the length of any recording. Then you could listen to and repeat each naturally occurring phrase with exactly the right amount of time to do so. Can this process be scripted?

The holy grail for this application would be to mark each minimum length of sound between some minimum length of silence as a phrase, and append silence of the same length as that phrase. This would double the length of any recording. Then you could listen to and repeat each naturally occurring phrase with exactly the right amount of time to do so. Can this process be scripted?
The problem would be in accurately detecting phrases.
In natural speech there is often, but not always, a longer pause between phrases than between words in a phrase. If you can guarantee a certain minimum length of silence between phrases then yes it could be scripted, but with natural speech that cannot be guaranteed.
True, you may not find conventional phrases by acoustic analysis. Galileo had the same problem with his telescope. What you find in speech is far more interesting than what’s taught. But dramatic actors do read audiobooks with short pauses between groups of connected words, that match up reassuringly with our grammar tales.
So I defined ‘phrase’ as a segment of sound between silences, durations user-defined depending on the recording. Example: silences <-40 dB >0.200 sec, speech segments 3+ secs. But match the duration of appended silence to the duration of each sound segment.
An enhancement that better models the conventional phrase might be a heuristic that chooses not the first, but the longest deepest silence within an acceptable range of end points.
I’ve had a quick look at the plug-in (it’s quite a while since I wrote it).
I think a useful addition which would suit your user case would be to add an option to make the added silence a percentage of the previous non-silence. Thus, when set to 100% it would add silence equal to the length of the preceding audio.
One slight problem is that the plug-in posted in this topic is a hack. It would be much better if this was coded properly.
I’m not at home at present and I’ll probably forget, but if you think this would be a useful addition, please start a new topic in the Nyquist > New Plug-ins forum (http://forum.audacityteam.org/viewforum.php?f=42) and I’ll take a look later in the week.
Steve
Thanks, Steve - this looks like exactly what I want but it seems broken.
I’m getting an error message stating that it’s not returning audio. Perhaps the interface for nyquist
has changed and you need to now explicitly do (return ) with a value. Maybe something like (return s)?
I haven’t looked at the code in detail or tried that yet since you’re probably more familiar with it.
Also this is useful enough it would seem appropriate to combine it with the truncate silence plugin so that one
filter could work both ways.
I want to use this plugin to allow time to write down vocabulary words in foreign language lessons
rather than just listening, but it seems it’s broken with the latest download of Audacity for Windows.
(I could also try Linux & Mac versions, but the error message sounds like it would be platform independent)
For my purposes (and I imagine others) it would be really helpful if a player could display the text of the
tags as the audio plays. I would use the silence finder and change the tags to the vocabulary words, then
watch and write down the words as they are pronounced) Are you aware of anything that displays tags while
playing audio? or would it be new development effort?

I’ve hacked the code of the Silence Finder plug-in so that it will insert additional silence instead of creating labels.
This is a “quick ‘n’ dirty” hack rather than a polished piece of code, so there are a few limitations:
- probably requires Audacity 1.3.7 or later (only tested on 1.3.11)
- quite memory hungry - applying to long tracks will probably crash Audacity. To ensure that used memory is released, restart Audacity.
- mono tracks only.
(the “category” is also wrong, but this will not affect current versions of Audacity)To see where silence will be inserted you can run “Silence Finder” first, then use the same settings for “Silence Lengthen”
To use, extract the attached file into your Audacity plug-ins directory. Restart Audacity and “Silence Lengthen” will appear in the Effects menu.

I’m getting an error message stating that it’s not returning audio.
If you’re using the version from here: lengthen silences - #9 by steve
then the problem is probably that you are trying to use the effect on a stereo track. That version only works on mono tracks.
A stereo capable version is here: lengthen silences - #20 by silencesound