Summary
Add a unified audio ingestion pipeline that handles both standalone audio files and audio tracks extracted from video files. Currently the video pipeline in worker.js runs Whisper transcription on video audio, but it's tightly coupled to the video processing path. This issue proposes a dedicated, reusable audio ingestion module that serves as the single entry point for all audio processing — whether the source is a .mp3 file or the audio track demuxed from a .mp4.
Motivation
Many UAP/UAV datasets include standalone audio recordings — cockpit comms, ATC radio intercepts, field observer narrations, and ambient sensor captures. These files currently get silently skipped by walkFiles() in file-ingestion.js, losing potentially critical data.
Additionally, the existing video pipeline already extracts audio via ffmpeg for Whisper transcription, but this logic is embedded directly in the video processing path. A unified audio module would:
- Eliminate duplication — one transcription pipeline for all audio sources
- Enable richer audio analysis — speaker diarization, ambient noise classification, signal anomaly detection
- Improve maintainability — video ingestion delegates to the audio module instead of inlining Whisper calls
Proposed Scope
Supported Standalone Formats
.mp3, .wav, .ogg, .flac, .m4a, .aac
Video Audio Extraction Integration
- The existing video pipeline (
worker.js / video_ingestion.py) should delegate its audio processing to this module instead of running Whisper inline.
- When processing a video file, ffmpeg demuxes the audio track → the unified audio module handles transcription and metadata extraction → results are merged back into the video's SIR entry.
- This creates a single code path:
video → demux audio track → audio ingestion module → transcription + metadata.
Core Audio Ingestion Pipeline
- Audio Detection — Extend the
SUPPORTED_EXTENSIONS set in src/ingestion/file-ingestion.js to include audio formats.
- Audio Extraction from Video — Refactor
video_ingestion.py to expose audio extraction as a callable sub-step that feeds into the shared audio pipeline.
- Transcription — Route all audio (standalone files + demuxed video tracks) through Whisper via a dedicated
audio_ingestion.py script or an expanded video_ingestion.py.
- Metadata Extraction — Extract audio metadata (duration, sample rate, channels, bitrate, codec) and attach to the SIR schema.
- NLP Pass — Feed the transcribed text through the existing NLP entity extraction pipeline (
extractDates, extractLocations, term frequency) so audio content participates in all four analytics tiers.
Worker Thread Integration
- Process standalone audio files through the existing
worker_threads pool, following the same deferred-termination patterns established in AGENTS.md.
- Leverage the existing Python offloading pattern from
scripts/video_ingestion.py for Whisper transcription.
- Video processing calls into the same audio sub-pipeline, avoiding duplicate Whisper codepaths.
Output Schema
Standalone audio files:
{
"name": "recording_001.mp3",
"content": "<transcribed text>",
"metadata": {
"type": "audio",
"duration_seconds": 142,
"sample_rate": 44100,
"channels": 2,
"codec": "mp3",
"bitrate_kbps": 320
},
"dates": [...],
"locations": [...]
}
Video files (audio portion merged into existing video SIR):
{
"name": "DOD_111689133.mp4",
"content": "<transcribed audio text>",
"metadata": {
"type": "video",
"duration_seconds": 34,
"audio": {
"sample_rate": 48000,
"channels": 2,
"codec": "aac",
"has_speech": true
}
},
"dates": [...],
"locations": [...]
}
Acceptance Criteria
Related Files
src/ingestion/file-ingestion.js — file discovery and worker dispatch
src/ingestion/worker.js — per-file processing logic (video audio currently inlined here)
scripts/video_ingestion.py — existing Python Whisper/OCR offloading (audio extraction to be refactored)
src/pipeline.js — analytics pipeline orchestrator
docs/ROADMAP.md — feature tracking
Relationship to #20
This issue provides the audio foundation that #20 (Advanced Video Content Analysis) builds on. Once audio is handled by a dedicated module, #20 can focus purely on the visual analysis layer without duplicating audio concerns.
Summary
Add a unified audio ingestion pipeline that handles both standalone audio files and audio tracks extracted from video files. Currently the video pipeline in
worker.jsruns Whisper transcription on video audio, but it's tightly coupled to the video processing path. This issue proposes a dedicated, reusable audio ingestion module that serves as the single entry point for all audio processing — whether the source is a.mp3file or the audio track demuxed from a.mp4.Motivation
Many UAP/UAV datasets include standalone audio recordings — cockpit comms, ATC radio intercepts, field observer narrations, and ambient sensor captures. These files currently get silently skipped by
walkFiles()infile-ingestion.js, losing potentially critical data.Additionally, the existing video pipeline already extracts audio via ffmpeg for Whisper transcription, but this logic is embedded directly in the video processing path. A unified audio module would:
Proposed Scope
Supported Standalone Formats
.mp3,.wav,.ogg,.flac,.m4a,.aacVideo Audio Extraction Integration
worker.js/video_ingestion.py) should delegate its audio processing to this module instead of running Whisper inline.video → demux audio track → audio ingestion module → transcription + metadata.Core Audio Ingestion Pipeline
SUPPORTED_EXTENSIONSset insrc/ingestion/file-ingestion.jsto include audio formats.video_ingestion.pyto expose audio extraction as a callable sub-step that feeds into the shared audio pipeline.audio_ingestion.pyscript or an expandedvideo_ingestion.py.extractDates,extractLocations, term frequency) so audio content participates in all four analytics tiers.Worker Thread Integration
worker_threadspool, following the same deferred-termination patterns established inAGENTS.md.scripts/video_ingestion.pyfor Whisper transcription.Output Schema
Standalone audio files:
{ "name": "recording_001.mp3", "content": "<transcribed text>", "metadata": { "type": "audio", "duration_seconds": 142, "sample_rate": 44100, "channels": 2, "codec": "mp3", "bitrate_kbps": 320 }, "dates": [...], "locations": [...] }Video files (audio portion merged into existing video SIR):
{ "name": "DOD_111689133.mp4", "content": "<transcribed audio text>", "metadata": { "type": "video", "duration_seconds": 34, "audio": { "sample_rate": 48000, "channels": 2, "codec": "aac", "has_speech": true } }, "dates": [...], "locations": [...] }Acceptance Criteria
.mp3,.wav,.ogg,.flac,.m4a,.aac) are discovered bywalkFiles()recursive scannerdocs/architecture.mdanddocs/USER_GUIDE.mdupdated to list audio formats and describe the unified audio pipelineRelated Files
src/ingestion/file-ingestion.js— file discovery and worker dispatchsrc/ingestion/worker.js— per-file processing logic (video audio currently inlined here)scripts/video_ingestion.py— existing Python Whisper/OCR offloading (audio extraction to be refactored)src/pipeline.js— analytics pipeline orchestratordocs/ROADMAP.md— feature trackingRelationship to #20
This issue provides the audio foundation that #20 (Advanced Video Content Analysis) builds on. Once audio is handled by a dedicated module, #20 can focus purely on the visual analysis layer without duplicating audio concerns.