Skip to content

Configuration

HRAshton edited this page Oct 18, 2025 · 2 revisions

The configuration defines all user-controllable parameters governing how audio is loaded, processed, and compared.
It ensures reproducibility and controls sensitivity, precision, and performance of the intro/outro detection process.

Parameters

1. rate

  • Type: int
  • Default: 44100
  • Meaning:
    Sampling rate (in Hz) to which all audio files are resampled.
  • Effect:
    You can use higher rates to preserve more frequency detail but increase processing time and memory use. However, there is no benefit beyond the original recording rate.

2. min_segment_length_sec

  • Type: int
  • Default: 30
  • Meaning:
    Minimum length of the intro in seconds.
  • Effect:
    Defines the lower bound for interval detection.
    Audios shorter than this are ignored as invalid.

3. max_segment_length_sec

  • Type: int
  • Default: 150
  • Meaning:
    Maximum length of the intro in seconds.
  • Effect:
    Defines the upper bound for interval detection.
    Segments longer than this are ignored as invalid.
    Helps avoid false positives from longer segments.

4. precision_secs

  • Type: float
  • Default: 0.5
  • Meaning:
    Time resolution of correlation steps, in seconds.
  • Effect:
    Controls the granularity of intro boundary estimation.
    Lower values increase precision but require more computation.
    The final results are not rounded to this precision, as they can be more precise.

5. series_window

  • Type: int
  • Default: 5
  • Meaning:
    Number of sequential episode samples used for comparison.
  • Effect:
    Larger windows reduce false positives but increase processing cost and delay.

6. offset_searcher_sequential_secs

  • Type: int
  • Default: 30
  • Meaning:
    Duration (in seconds) of continuous “non-intro” signal required to confirm intro ending.
  • Effect:
    Defines how strictly the system distinguishes intros from ordinary transitions.

7. adjustment_threshold

  • Type: bool
  • Default: True
  • Meaning:
    Enables or disables post-processing adjustment of intro boundaries.
  • Effect:
    If True, results are slightly extended near boundaries for better perceptual alignment.
    See also adjustment_threshold_secs.

8. adjustment_threshold_secs

  • Type: float
  • Default: 3.0
  • Meaning:
    Maximum time margin for border adjustments (seconds).
  • Effect:
    Defines how far the algorithm can shift detected boundaries during fine-tuning.

9. save_intermediate_results

  • Type: bool
  • Default: False
  • Meaning:
    Controls whether intermediate correlation maps are stored.
  • Effect:
    When enabled, allows inspection of correlation heatmaps and intermediate steps.
    Useful for debugging, but should be disabled for routine use to save disk space.

Interdependencies

  • min_segment_length_sec, max_segment_length_sec, and precision_secs define search space and time resolution.
  • series_window influences stability of cross-episode correlation.
  • adjustment_threshold and adjustment_threshold_secs apply only if intro improvement is enabled.