I have a streamed audio track that looks like it was stretched by adding silence every 1000ms. The duration of the silence increments and then resets.
The duration goes:
0ms (no gap)
4ms
6ms
8ms
11ms
14ms
16ms
19ms
Then back to 0. The start of the gaps is exactly 1000ms apart.
The gap isn’t necessarily completely silent so I can’t use Truncate Silence to remove them. At the level required to catch them all it starts to delete good portions.
Since they are all 1000ms apart is seems like there should be a way to:
Advance 1000ms, select 4ms, delete
advance 996ms, select 6ms, delete
advance 994ms, select 8ms, delete
etc.
Every 1000ms a gap begins. The gap widens until it wraps back around to 0.
So I need a way to cut out 1000-1004, 2000-2006,3000-3008,4000-4011,5000-5014,6000-6016,7000-7019, skip 8000 (no gap/reset), 9000-9004… etc.
I think that would be possible with a “Nyquist Macro”, but before spending too much time on this, I’d suggest that you try doing a bit of it manually (using the Selection Toolbar to make the selections). Is the result satisfactory, or does it leave objectionable clicks every second?
I’d also suggest looking into the possibility of getting a recording that doesn’t have the problem - that could be a lot quicker, easier, and more effective than trying to create a plug-in to fix this badly damaged recording.
Please post a short sample of the audio so that I can see exactly what we are dealing with. About 20 seconds in WAV format would be good.
Did you make the original recording in WAV format?
AAC is a lossy compressed format. Lossy compression produces an approximation of the original, with a much smaller file size. It’s possible that the original had absolute silence in those gaps, which would then mean that you could use Truncate Silence. Is it possible for you to re-record the original?
That’s useful to know. I think there’s a limit to the number of commands that a Macro can do in one go. This code is running two Macro commands for every second of audio, plus one more to the entire selection, so that’s 1201 commands for a 10 minute selection.