Audio::FindChunks

Audio::FindChunks can breaks audio files into sound/silence parts.
Download

Audio::FindChunks Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ilya Zakharevich
  • Publisher web site:
  • http://search.cpan.org/~ni-s/Tk-804.027/pod/pTk.pod

Audio::FindChunks Tags


Audio::FindChunks Description

Audio::FindChunks can breaks audio files into sound/silence parts. Audio::FindChunks can breaks audio files into sound/silence parts.SYNOPSIS use Audio::FindChunks; # Duplicate input to output, caching RMS values to a file (as a side effect) Audio::FindChunks->new(rms_filename => 'x.rms', filter => 1)->get('rms_data'); # Output human-readable info, using RMS cache file 'xxx.rms' if present: Audio::FindChunks->new(cache_rms => 1, filename => 'xxx.mp3', stem_strip_extension => 1)->output_blocks(); # Remove start/end silence (if longer than 0.2sec): Audio::FindChunks->new(cache_rms => 1, filename => 'xxx.mp3', min_actual_silence_sec => 1e100)->split_file(); # Split a multiple-sides tape recording Audio::FindChunks->new(filename => 'xxx.mp3', min_actual_silence_sec => 11 )->split_file({verbose => 1});Audio sequence is broken into parts which contain only noise ("gaps"), and parts with usable signal ("tracks").The following configuration settings (and defaults) are supported: # For getting PCM flow (and if averaging data is read from cache) frequency => 44100, # If 'raw_pcm' or 'override_header_info' only bytes_per_sample => 4, # likewise channels => 2, # likewise sizedata => MY_INF, # likewise (how many bytes of PCM to read) out_fh => *STDOUT, # mirror WAV/PCM to this FH if 'filter' # Process non-WAV data: preprocess => {mp3 => , [], ]}, # Second contains extra args to read stdin # RMS cache (used if 'valid_rms') rms_extension => '.rms', # Appended to the 'filestem' # Averaging to RMS info sec_per_chunk => 0.1, # The window for taking mean square # thresholds picking from the list of sorted 3-medians of RMS data threshold_in_sorted_min_rel => 0, # relative position of 'threashold_min' threshold_in_sorted_min_sec => 1, # shifted by this amount in the list threshold_factor_min => 1, # the list elt is multiplied by this threshold_in_sorted_max_rel => 0.5, # likewise threshold_in_sorted_max_sec => 0, # likewise threshold_factor_max => 1, # likewise threshold_ratio => 0.15, # relative position between min/max # Chunkification: smoothification above_thres_window => 11, # in units of chunks above_thres_window_rel => 0.25, # fractions of chunks above threshold # in a window to make chunk signal # Splitting into runs of signal/noise max_tracks => 9999, # fail if more signal/noise runs min_signal_sec => 5, # such runs of signal are forced min_silence_sec => 2, # likewise ignore_signal_sec => 1, # short runs of signal are ignored min_silence_chunks_merge (see below) # and long resulting runs of silence # are forced # Calculate average signal in an interval "deeply inside" silence runs local_level_ignore_pre_sec => 0.3, # offset the start of this interval local_level_ignore_pre_rel => 0.02, # additional relative offset local_level_ignore_post_sec => 0.3, # likewise for end of the interval local_level_ignore_post_rel => 0.02, # likewise # Enlargement of signal runs: attach consequent chunks with signal this much # above this average over the neighbour silence run local_threshold_factor => 1.05, # Final enlargement of runs of signal extend_track_end_sec => 0.5, # Unconditional enlargement extend_track_begin_sec => 0.3, # likewise min_boundary_silence_sec => 0.2, # Ignore short silence at start/endNote that above_thres_window is the only value specified directly in units of chunks; the other *_sec may be optionally specified in units of chunks by setting the corresponding *_chunks value. Note also that this window should better be decreased if minimal allowed silence length parameters are decreased.These values are mirrored from other values if not explicitly specified: min_actual_silence_sec Requirements: · Perl


Audio::FindChunks Related Software