

InterviewSolution
Saved Bookmarks
1. |
Solve : Batch trim audio files at regular/sequential intervals? |
Answer» <html><body><p>(hope I didn't post this twice - I think I was logged off on my first try)<br/><br/>I'm trying to efficiently create sequential two minute clips from a library of wav files. This sounds like a batch file to me but I haven't been able to solve the problem on my own.<br/><br/>Details: I have about 200 wav files spread over <a href="https://interviewquestions.tuteehub.com/tag/multiple-1105557" style="font-weight:bold;" target="_blank" title="Click to know more about MULTIPLE">MULTIPLE</a> directories and subdirectories. Each file is 10 to 20 minutes long. I want to take each file and make several two minute wav files from them. For example, if I had a 10 minute file named x, I want the output to be 1x, 2x, 3x, 4x, 5x where file 1x is a clip of the first two minutes of x, 2x is a clip starting at minute 2 and ending at 4 and so on. Ideally these would end up in a folder with the name of the parent file. I can easily do this with a single file using the Regular Interval Labels tool in Audacity but I don't know of a way to use this tool to process multiple files at once.<br/><br/>Does anyone have suggestions for me? I'm not experienced with for loops, but I thought maybe the combination of a for loop and an audio utility in Cygwin might do the job. However, I’m not familiar with a utility that can do this.<br/><br/>This is my first post here and I hope I'm not repeating a question that's been asked <a href="https://interviewquestions.tuteehub.com/tag/previously-7318154" style="font-weight:bold;" target="_blank" title="Click to know more about PREVIOUSLY">PREVIOUSLY</a>. I haven't found anything similar in my searches but just let me know if I should be looking at a past thread. Also, let me know if you need more information from me.<br/><br/>Am I'm using:<br/>XP<br/>MS DOS 5.1.2600<br/>Cygwin 1.7.7<br/>Audacity 1.3.12 Bata<br/>GoldWave 5.58<br/><br/>Thanks for any help you can offer!Out of curiosity, why do you want to break up these audio files? The answer might help some one else to offer a solution. Quote from: rthompson80819 on October 18, 2010, 04:26:34 PM</p><blockquote>Out of curiosity, why do you want to break up these audio files? The answer might help some one else to offer a solution.<br/></blockquote> <br/>Hi rthompson,<br/><br/>Thanks for the suggestion. The <a href="https://interviewquestions.tuteehub.com/tag/recordings-1180476" style="font-weight:bold;" target="_blank" title="Click to know more about RECORDINGS">RECORDINGS</a> are of bird choruses and the two minute segments will be used to test volunteer bird counter's ability to identify <a href="https://interviewquestions.tuteehub.com/tag/birds-343637" style="font-weight:bold;" target="_blank" title="Click to know more about BIRDS">BIRDS</a> by song. Maybe the best thing to do process each file on its own but I thought if there was a better way I should learn it.<br/><br/>Thanks. Code: <a>[Select]</a>MS DOS 5.1.2600<br/>There is no such animal; I <a href="https://interviewquestions.tuteehub.com/tag/believe-395244" style="font-weight:bold;" target="_blank" title="Click to know more about BELIEVE">BELIEVE</a> you mean Windows XP command line which is not MS-DOS. <br/><br/>If you can get the files into mp3 format, which is a trivial undertaking, you can use a tool called mp3splt which (among other things) can split an mp3 file into equal sized parts<br/><br/> Quote<blockquote>mp3splt -t 10.00 album.mp3 [Split album.mp3 in many equal-sized parts of 10 minutes each.]<br/><br/>mp3splt album.mp3 10.12 14.25 -o out.mp3 [Split album.mp3 starting at 10min 12sec, ending at 14mins 25sec and save the mp3 slice in a new file called out.mp3]</blockquote> <br/><a href="https://labnol.blogspot.com/2006/10/mp3-cutters-split-mp3-files-into.html">http://labnol.blogspot.com/2006/10/mp3-cutters-split-mp3-files-into.html</a><br/><br/><br/><br/>Great, thanks Salmon Trout! mp3splt looks like just what I need. And you are correct of course, I'm using the XP command prompt v. 5.1.2600. Not sure way I wrote MS DOS... I do know better</body></html> | |