Skip to content

FIX: keep the source video when audio extraction returns it unchanged - #3298

Open
Manohar Paturi (ManoharPaturi) wants to merge 2 commits into
microsoft:mainfrom
ManoharPaturi:fix/video-audio-cleanup-deletes-source
Open

Manohar Paturi (ManoharPaturi) wants to merge 2 commits into
microsoft:mainfrom
ManoharPaturi:fix/video-audio-cleanup-deletes-source

Conversation

@ManoharPaturi

Copy link
Copy Markdown
Contributor

Description

Fixes #3297

The video scorers unlink the extracted audio file after scoring it, but AudioTranscriptHelper.extract_audio_from_video hands back the input path unchanged when the video's own audio track is already compliant WAV. In that case the cleanup deleted the original video the caller passed in. The unlink now skips the source file, matching the guard _transcribe_audio_async already has for the same situation.

Tests and Documentation

Added a regression test that mocks the extractor to return the video's own path and asserts the file still exists after scoring. It fails on main and passes with the change. The full video and audio scorer suites pass (51 tests).

No documentation change needed, so I did not run JupyText.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Video scorer deletes the original video file when its audio track is already compliant

1 participant