callcut.pipeline.predict_recordings🔗
- callcut.pipeline.predict_recordings(model, extractor, audio_paths, decoder, *, hop_frames=None)[source]🔗
Run inference on recordings and decode to call intervals.
For each recording: loads audio, extracts features, predicts frame-level probabilities, and decodes to call intervals. No ground truth annotations are needed.
- Parameters:
- model
BaseDetector Trained model for call detection. Should already be on the desired device.
- extractor
BaseExtractor Feature extractor matching the model’s expected input.
- audio_paths
listofPath|str Paths to audio files to process.
- decoder
BaseDecoder Decoder for converting probabilities to call intervals.
- hop_frames
int|None Hop between inference windows in frames. If
None, uses the model’s default (75%% overlap).
- model
- Returns:
- predictions
listofRecordingPrediction Predicted call intervals for each recording.
- predictions
Examples
>>> from callcut.pipeline import load_pipeline, predict_recordings >>> >>> model, extractor, decoder = load_pipeline("pipeline.pt") >>> predictions = predict_recordings(model, extractor, audio_files, decoder) >>> for pred in predictions: ... print(f"{pred.audio_path.name}: {len(pred.intervals)} calls")