Greetings The Unix application 'wavsilence' is a program that takes a WAV file with gaps of silence and creates smaller WAV files, containing the data between the gaps. ( http://danplanet.com/wav/ ) Is there a similar program for ogg vorbis? How difficult would it be to write such a program? --------------------------------------------------------------------------- The usage information, as displayed by 'wavsilence -h': | wavsilence v0.40 - Dan Smith (dsmith@danplanet.com) | Usage: wavsilence <options> | Options: | -g <gap> Minimum gap (in seconds) to be considered silence | -t <threshold> Volume (in % of Max) to be considered silence | -v Verbose mode (specify multiple times to increase verbosity) | -I Print input WAV information | -e <cmd> Execute <cmd> when each piece is finished, with the filename | as the last argument | -r Remove the WAV file after <cmd> (only valid with -e) | -p Display progress and statistics during operation | -i <file> Read from <file> instead of stdin | -n <name> Name output files <name>N | -l <file> Log summary information in <file> | -b <num> Buffer input by <num> samples (1 is default; try 16) | -P <cmd> Pipe output of each segment to <cmd> | -m <seconds> Minimum track length (in seconds) | -M <minutes> Minimum track length (in minutes) | -s Skip silence (remove the silence between pieces) | -c <num> Counter-start. With this option you can set the initial | value of the file-number-counter. | -h Display this message | Operation: | WAV file is read via stdin, split at points of silence into files | named "piece-N.wav" (unless user specified) An example invocation is: % ./wavsilence -g 2 -t 4 -b 64 -l log.txt -p -i bigfile.wav This will search for gaps of >=2s where the volume is <=4% of max. 64 samples will be read at a time (to increase performance). Progress will be displayed during execution and a summary will be left in the 'log.txt' file when finished. Regards, JM Rotenberry rotenber@io.com
James M. Rotenberry wrote:> Greetings > > The Unix application 'wavsilence' is a program that takes a WAV file with > gaps of silence and creates smaller WAV files, containing the data between > the gaps. ( http://danplanet.com/wav/ ) > > Is there a similar program for ogg vorbis?I believe Audacity ( //audacity.sourceforge.net ) does that. Check for yourself, or wait for someone else to reply, or think of a workaround using wave files. -Ivo
Luis Cordova Thank you for your message.> Please let me know more specifics on your application.There are radio stations that stream audio over the Internet 24 hours a day in Ogg Vorbis at a constant bit rate, and it is possible to capture these files. I would like to remove the commercials. It would be possible to edit the files using audacity or some other interactive application, but this would be very time consuming. My idea is to find the correct 'silent gap' parameters to split the file into music and talk pieces. I am guessing that even a crude (automated) spectral analysis should be able to separate the music files from the talking files, and the talking files can be discarded. If a few music files are discarded as well, there is plenty more music where they came from! To keep the audio as clean as possible, the file should be sliced as ogg vorbis and not converted to a new format and then converted back to ogg vorbis (like audacity). If the process can be completely automated, you can capture at night and listen during the day. Regards, JM Rotenberry rotenber@io.com
Ivo Thank you for your message.> I believe Audacity ( //audacity.sourceforge.net ) does that.Audacity will do this, but it is an interactive process and I would prefer a command line tool. Furthermore, I believe that audacity converts audio into its own internal type and then (after you have made your changes) converts the audio back to ogg vorbis. It does not seem a good idea to perform all these conversions when all I want is to slice the original file into pieces. Regards, JM Rotenberry rotenber@io.com
Aaron Colwell Thank you for your message.> I have no idea what stations you are trying to record, but if they are like > the Virgin Radio streams you can just look for chain boundries in the stream.Thank you, this is an good idea. I will perform some analysis on the captured audio streams and look for chain boundries.> If the station you are interested in does commercial and music > switching before the encoder and doesn't update the TAC info then > you'll probably have to resort to some sort of DSP solution.For me, captured audio streams are suficient. I agree that real-time analysis would probably need a hardware solution. Regards JM Rotenberry rotenber@io.com
There is a tool called "Mp3splt" that cuts ogg and mp3 files without decoding/recoding. http://mp3splt.sourceforge.net/ El Lun 27 Mar 2006 12:38, James M. Rotenberry escribi?:> Greetings > > The Unix application 'wavsilence' is a program that takes a WAV file with > gaps of silence and creates smaller WAV files, containing the data between > the gaps. ( http://danplanet.com/wav/ ) > > Is there a similar program for ogg vorbis? > > How difficult would it be to write such a program? > --------------------------------------------------------------------------- > > The usage information, as displayed by 'wavsilence -h': > | wavsilence v0.40 - Dan Smith (dsmith@danplanet.com) > | Usage: wavsilence <options> > | Options: > | -g <gap> Minimum gap (in seconds) to be considered silence > | -t <threshold> Volume (in % of Max) to be considered silence > | -v Verbose mode (specify multiple times to increase > | verbosity) -I Print input WAV information > | -e <cmd> Execute <cmd> when each piece is finished, with the > | filename as the last argument > | -r Remove the WAV file after <cmd> (only valid with -e) > | -p Display progress and statistics during operation > | -i <file> Read from <file> instead of stdin > | -n <name> Name output files <name>N > | -l <file> Log summary information in <file> > | -b <num> Buffer input by <num> samples (1 is default; try 16) > | -P <cmd> Pipe output of each segment to <cmd> > | -m <seconds> Minimum track length (in seconds) > | -M <minutes> Minimum track length (in minutes) > | -s Skip silence (remove the silence between pieces) > | -c <num> Counter-start. With this option you can set the initial > | value of the file-number-counter. > | -h Display this message > | Operation: > | WAV file is read via stdin, split at points of silence into files > | named "piece-N.wav" (unless user specified) > > An example invocation is: > > % ./wavsilence -g 2 -t 4 -b 64 -l log.txt -p -i bigfile.wav > > This will search for gaps of >=2s where the volume is <=4% of max. 64 > samples will be read at a time (to increase performance). Progress > will be displayed during execution and a summary will be left in the > 'log.txt' file when finished. > > Regards, > JM Rotenberry > rotenber@io.com > > _______________________________________________ > Vorbis mailing list > Vorbis@xiph.org > http://lists.xiph.org/mailman/listinfo/vorbis-- Daniel Mario Vega dv5a@dc.uba.ar