I have an audio file where an annoying segment of few seconds is repeated at different times in the file.
I want to feed a copy of this annoying segment to a tool to recognize all instances and remove them, but I couldn't find a way.
This seems like a simple enough idea. Is there really no way to do that in Windows?
Is there really no way to mute/cut audio by pattern?
Re: Is there really no way to mute/cut audio by pattern?
Great question, I don't even know how I would find a similar audio element inside a file, much less delete multiple instances.
Re: Is there really no way to mute/cut audio by pattern?
Suggestion (manual method, not very sophisticated):
Use your favorite audio editor e.g. Audacity ( https://www.portablefreeware.com/index.php?id=648 ), locate, select and cut the unwanted parts of the audio file.
Then export the resulting audio file.
Use your favorite audio editor e.g. Audacity ( https://www.portablefreeware.com/index.php?id=648 ), locate, select and cut the unwanted parts of the audio file.
Then export the resulting audio file.
Re: Is there really no way to mute/cut audio by pattern?
That's what I though must have existed already. It seems easily doable without AI or such.
@juverax
Thanks for the tip, but I really don't want to do it the tedious way. That's a computer's job if you get what I mean.
Re: Is there really no way to mute/cut audio by pattern?
https://audioz.download/software/win/ has many audio processing tools.
Re: Is there really no way to mute/cut audio by pattern?
Vevy said: "I have an audio file where an annoying segment of few seconds is repeated at different times in the file"
Question: Is this "annoying segment" exactly the SAME, I mean the sequence of bytes encoding this segment is repeated at different places in the audio file?
1 - If YES, then IMO it is relatively trivial to write an app that parses the RAW audio file, identifies the identical sequences and deletes/replaces them with something else.
Note that conversion between a raw file and a compressed file may introduce spurious bytes.
However the problem is formally similar to "finding a string inside a string" which is a classic algorithm, and there are many web sites where you could look for a solution:
https://www.codeproject.com/
https://www.geeksforgeeks.org/
https://stackoverflow.com/ . . . etc.
2 - If NO, well it depends whether these annoying segments occur at regular intervals - even if the spectrum is slightly different - then all it takes is to remove the bytes at the appropriate positions. Consult the web sites mentioned above, and alike.
3 - If the "annoying segments" are not identical and occur at different places in the audio file, then IMO this is a more difficult problem, because technically you don't have a simple way of "specifying" the annoying segments. Maybe this is a problem for AI enthusiasts .
Once, I had a similar problem: I was trying to transfer an old 78 rpm vinyl disk that was badly scratched. Each peak caused by the scratch had a slightly different envelope and occurred at slightly different intervals.
Question: Is this "annoying segment" exactly the SAME, I mean the sequence of bytes encoding this segment is repeated at different places in the audio file?
1 - If YES, then IMO it is relatively trivial to write an app that parses the RAW audio file, identifies the identical sequences and deletes/replaces them with something else.
Note that conversion between a raw file and a compressed file may introduce spurious bytes.
However the problem is formally similar to "finding a string inside a string" which is a classic algorithm, and there are many web sites where you could look for a solution:
https://www.codeproject.com/
https://www.geeksforgeeks.org/
https://stackoverflow.com/ . . . etc.
2 - If NO, well it depends whether these annoying segments occur at regular intervals - even if the spectrum is slightly different - then all it takes is to remove the bytes at the appropriate positions. Consult the web sites mentioned above, and alike.
3 - If the "annoying segments" are not identical and occur at different places in the audio file, then IMO this is a more difficult problem, because technically you don't have a simple way of "specifying" the annoying segments. Maybe this is a problem for AI enthusiasts .
Once, I had a similar problem: I was trying to transfer an old 78 rpm vinyl disk that was badly scratched. Each peak caused by the scratch had a slightly different envelope and occurred at slightly different intervals.
Re: Is there really no way to mute/cut audio by pattern?
Thanks a lot for the detailed reply juverax
The answer is yes. It is the same recording inserted every 7-8 minutes (interval varies a bit). The same recording, but I don't know if it will be byte-perfect. There are a lot of image deduplication tools that work even on similar, non-identical images. I just can't find one that does the same for audio signal.
The answer is yes. It is the same recording inserted every 7-8 minutes (interval varies a bit). The same recording, but I don't know if it will be byte-perfect. There are a lot of image deduplication tools that work even on similar, non-identical images. I just can't find one that does the same for audio signal.
Re: Is there really no way to mute/cut audio by pattern?
Is the segment the same length? If so you would "only" have to identify the starting timestamps e. 6.58 13.23 etc and then use a (cli) tool to split the file in to sections, say the fragment is 10 seconds:
0-6.58; 7.08-13.23; 13.33-... and join them back
still requires manual processing of course
I don't know what file it is but perhaps if you can find a audio-to-text program, and if the repeating section has a clear identifiable word in it e.g. "You're listening to TPFC Radio" that might help you automate finding the timestamps.
0-6.58; 7.08-13.23; 13.33-... and join them back
still requires manual processing of course
I don't know what file it is but perhaps if you can find a audio-to-text program, and if the repeating section has a clear identifiable word in it e.g. "You're listening to TPFC Radio" that might help you automate finding the timestamps.
Re: Is there really no way to mute/cut audio by pattern?
The annoying segment is the same length (same recording), but occurs at variable intervals.
That's a great idea! I have speech-to-text software that can output to srt.I don't know what file it is but perhaps if you can find a audio-to-text program, and if the repeating section has a clear identifiable word in it e.g. "You're listening to TPFC Radio" that might help you automate finding the timestamps.
That gets us to semi-automation. Getting closer!