Skip to contents

Configuration

pam_config_read()
Read and validate a pamflow configuration file
pam_config_validate()
Validate a pamflow configuration
pam_load_config()
Alias for pam_config_read

Example project

A small synthetic project (audio, deployment sheet, config) used by the examples in this reference.

pam_example_project()
Create a small example project to try pamflow on

Audio Utilities (WAV + FLAC)

utils_audio
Audio I/O Utilities (WAV + FLAC)
pam_audio_exts()
Supported Audio File Extensions
pam_audio_pattern()
Regex Pattern Matching Supported Audio Files
pam_is_flac()
Check if a File is a FLAC File
pam_read_audio()
Read Audio File as a tuneR Wave Object (WAV or FLAC)
pam_cut_audio()
Cut Audio Clip Preserving Source Format

Stage 0 — Standardization & Triage

pam_standardize()
Standardize Raw PAM Audio Files (Stage 00 Engine)
pam_standardization_app()
Launch PAM Standardization & Data Triage Shiny App
pam_inspect_raw()
Inspect Raw Audio Directory
pam_parse_datetime()
Parse Datetime from Audio Filename or Metadata
pam_extract_grid()
Extract Grid, Recorder, or Site Identifier from Filename

Stage 1 — Scan & QC

pam_scan_audio()
Stage 1: scan standardized audio and build the master metadata table
pam_audio_info() pam_audio_info_dt()
Read Audio File Metadata (WAV or FLAC)
pam_audio_summary()
Summarize the audio master table
pam_list_audio()
List Audio Files in a Directory (WAV + FLAC)
pam_parse_filenames()
Parse grid and start time from recording filenames
pam_read_deployments()
Read and clean the deployment sheet
pam_match_deployments()
Attach recorder and coordinates by matching grid and time window
pam_check_deployments()
List problems in the deployment table
pam_add_qc()
Add QC flags to a master audio table

Stage 2 — Filter

pam_filter_audio()
Stage 2: high-pass filter all QC-passed recordings
pam_filter_one()
Filter one audio file with FFmpeg (WAV or FLAC)
pam_highpass_filter_string()
Build the FFmpeg filter string for a Butterworth high-pass

Stage 2b — Soundscape Indices

soundscape
Stage 2b: Soundscape Analysis (Indices & Summaries)
pam_soundscape_run()
Run Stage 2b Soundscape Analysis Pipeline
pam_soundscape_one()
Compute Ecoacoustic Soundscape Indices for a Single Audio File
pam_soundscape_batch()
Batch Process Audio Files for Soundscape Indices
pam_soundscape_summarise()
Summarize Soundscape Indices into Hourly, Diel, and Site Covariate Metrics
to_scalar_num()
Safely Extract a Single Numeric Value from Soundecology/Seewave Returns

Stage 2c — Soundscape Visualizations & Reports

soundscape_vis
Stage 2c: Soundscape Visualization & Diagnostics
pam_soundscape_run_vis()
Run Stage 2c Soundscape Visualization Pipeline
pam_soundscape_plot_diel()
Plot 24-Hour Diel Curves for Acoustic Indices
pam_soundscape_plot_phase()
Plot Day vs. Night Comparisons for Acoustic Indices
pam_soundscape_report()
Generate HTML Soundscape Diagnostic Report

Stage 3 — Detect

pam_detect()
Stage 3: run the custom BirdNET classifier on all QC-passed recordings
pam_assemble_detections()
Assemble raw detection batches into one detections table
pam_pending_batches()
Split pending work into batches, skipping completed items

Stage 4 — Process

pam_process_detections()
Stage 4: clean the detections of a run
pam_clean_detections()
Apply the cleaning rules to a detections table

Stage 5 — Validate

pam_validate()
Open the validation app
pam_validation_draw()
Draw a validation round and add it to the sample file
pam_validation_export()
Export audio clips and spectrograms for the sampled events (WAV + FLAC)
pam_validation_sample()
Draw a validation sample from a pool of events
pam_validation_import()
Join the reviewed verdicts to the sample table
pam_validation_pool()
Build the pool of candidate events for validation
pam_validation_metrics()
Precision by species and confidence band, and by confidence threshold
pam_validation_report()
Validation report: precision tables written to disk
pam_annotate()
Open the ground-truth annotation app

Stage 5b — Recall

pam_recall_draw()
Draw a round of random segments for ground-truth annotation
pam_recall_export()
Export audio and spectrograms for the ground-truth segments
pam_recall_frame()
All possible annotation segments of the recordings
pam_recall_sample()
Simple random sample of segments
pam_recall_metrics()
Segment-level recall, precision and F1 against ground truth
pam_recall_report()
Recall report for a detection run

Stage 6 — Occupancy

pam_build_occupancy()
Build occupancy detection histories for all qualifying species
pam_site_id()
Build site identifiers from the audio master table
pam_daily_effort()
Calculate daily recording effort per site
pam_detection_matrix()
Build a detection history matrix for one species
pam_occasion_covariates()
Build occasion-level covariate table
pam_site_covariates()
Build site-level covariate table

Ecological products

Per-species thresholds and a site, time-bin and species table with recording effort; activity patterns and richness.

pam_species_thresholds()
Choose a confidence threshold for each species from the validation results
pam_detection_table()
Table of detections and recording effort per site, time bin and species
pam_activity()
Activity patterns: detections per recorded hour
pam_plot_activity()
Plot activity patterns
pam_richness()
Species richness and diversity per site and occasion
pam_plot_richness()
Plot species richness

Stage 7 — Input for occupancy and abundance models

Count histories per species and site, covariates, seasons, and input ready for unmarked, ubms or spOccupancy. pamflow prepares the data; it does not fit the models.

pam_count_history()
Count history of one species: detections per site and occasion
pam_count_histories()
Count histories of many species at once
pam_as_count_history()
Make a count history from your own counts
pam_add_site_covariates()
Add site covariates to a count history
pam_define_seasons()
Define seasons from the occasions of a history
pam_model_input()
Prepare a count history as input for abundance and occupancy models
pam_check_model_input()
Check model input before fitting

Stage 8 — Reports

pam_report()
Generate PAM workflow reports
pam_report_data()
Gather report data from all completed stages
pam_report_excel()
Write summary tables to an Excel workbook

Standalone tool — BirdNET model training (not a workflow stage)

Train your own BirdNET classifier from R or in a point-and-click app. Nothing in the workflow calls these functions; the trained model is used by pointing the birdnet: section of the config at it.

pam_train_app()
Launch the BirdNET classifier training app
pam_birdnet_train_prepare()
Check a training dataset before training
pam_birdnet_train()
Train a custom BirdNET classifier from R
pam_birdnet_train_repeat()
Train the same classifier several times and summarize the metrics
pam_birdnet_train_metrics()
Read training metrics from a birdnet-train log

BirdNET environment & benchmark

pam_birdnet_setup()
Create a private Python environment for BirdNET
pam_birdnet_doctor()
Check the machine and Python environments needed for BirdNET
pam_birdnet_cleanup()
Stop BirdNET worker processes that were left behind
pam_birdnet_benchmark()
Benchmark Stage 3 detection speed at several worker counts

Utilities

pam_audio_history()
Follow audio files through the workflow
pam_log()
Write a timestamped log line to a per-stage log file
pam_run_stage()
Run a workflow stage with logging and error isolation
pam_checkpoint_read()
Read the set of already-processed item IDs
pam_checkpoint_add()
Record items as completed
pam_check_ffmpeg()
Check that FFmpeg is installed and supports the filter chain
pam_wilson_ci()
Wilson score confidence interval for a proportion