Skip to content

fix(asr): log active audio filename in AsrPipeline._build_document - #3535

Merged
ceberam merged 4 commits into
docling-project:mainfrom
charlesaurav13:fix/cli-log-active-filename
Jun 26, 2026
Merged

fix(asr): log active audio filename in AsrPipeline._build_document#3535
ceberam merged 4 commits into
docling-project:mainfrom
charlesaurav13:fix/cli-log-active-filename

Conversation

@charlesaurav13

Copy link
Copy Markdown
Contributor

Summary

When converting a batch (e.g. a directory of audio files with docling /path/to/dir), only a single Going to convert document batch... log entry appeared for the entire batch, with no indication of which file was being processed.

This made it impossible to track progress or identify which file was currently active — especially confusing for long audio transcriptions.

Fix: add a per-document info log at the start of _execute_pipeline. This fires for both sequential and concurrent conversion paths and is consistent with the existing Finished converting document X in Y sec. log that follows it.

INFO  Starting conversion of document lecture_01.mp3.
INFO  Finished converting document lecture_01.mp3 in 12.45 sec.
INFO  Starting conversion of document lecture_02.mp3.
...

Reproduction

docling /path/to/directory/with/multiple/audio/files

Previously only showed Going to convert document batch... with no per-file progress.

Related issue

Closes #3467

When converting a batch (e.g. a directory of audio files), there was no
per-file log entry indicating which document was being processed. Only a
single 'Going to convert document batch...' message appeared, making it
impossible to track progress or identify which file was active.

Add a per-document info log at the start of _execute_pipeline, which fires
for both sequential and concurrent conversion paths.

Fixes docling-project#3467
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @charlesaurav13, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

I, Saurav Pandey <sauravp1236@gmail.com>, hereby add my Signed-off-by to this commit: 58650cbdb05c0fcb5c54c8a4d6e83f3faee93e4d

Signed-off-by: Saurav Pandey <sauravp1236@gmail.com>
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cau-git

cau-git commented Jun 16, 2026

Copy link
Copy Markdown
Member

@charlesaurav13 thanks for the proposal, but I think the fix is not complete since it will then duplicate the logging for PDF files for example, which already happens in the particular pipeline, such as:
docling.pipeline.base_pipeline: Processing document right_to_left_03.pdf

Either you move this log into the simple pipeline / audio backend or we must remove logs on the other pipelines.

Please also apply the linting (make check, make validate-all) and clear the DCO check, so the tests pass. Thanks.

@cau-git cau-git left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes required as outlined above.

@charlesaurav13

Copy link
Copy Markdown
Contributor Author

Good catch — adding the log at _execute_pipeline level fires for all document types, duplicating the Processing document X line that already exists in the standard PDF/base pipeline.

The right scope is the ASR pipeline specifically (where no equivalent log currently exists). I'll update this PR to move the log into AsrPipeline instead of DocumentConverter._execute_pipeline, so it only fires for audio files.

Will also clear the DCO and run make check / make validate-all before pushing.

The log was placed at _execute_pipeline level in DocumentConverter, which
fires for all document types and duplicates the existing 'Processing
document X' message already emitted by BasePipeline.execute.

Scope the log to AsrPipeline._build_document instead, where audio
transcription specifically starts. Also improve the message from the
internal 'start _build_document in AsrPipeline: <full_path>' to the
user-friendly 'Transcribing audio document <filename>.' using only
the filename (not the full path) for consistency with other pipeline logs.

Fixes docling-project#3467

Signed-off-by: Saurav Pandey <sauravp1236@gmail.com>
@charlesaurav13 charlesaurav13 changed the title fix(cli): log active filename at start of each document conversion fix(asr): log active audio filename in AsrPipeline._build_document Jun 19, 2026
@charlesaurav13

Copy link
Copy Markdown
Contributor Author

Updated. The change is now scoped to AsrPipeline._build_document only:

  • Reverted the _execute_pipeline change in DocumentConverter (which fired for all formats).
  • Changed the existing log in _build_document from the internal 'start _build_document in AsrPipeline: <full_path>' to 'Transcribing audio document <filename>.' — user-facing wording using just the filename for consistency with other pipeline logs.

This means the log fires only for audio files, with no duplication. DCO signed off with -s.

@PeterStaar-IBM

Copy link
Copy Markdown
Member

@charlesaurav13 Can you do the DCO? see here: #3535 (comment)

@ceberam ceberam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

And I also like the slight improvement of using %s instead of the f-string for logging messages.

I, Saurav Pandey <sauravp1236@gmail.com>, hereby add my Signed-off-by to this commit: 58650cb

Signed-off-by: Saurav Pandey <sauravp1236@gmail.com>
@charlesaurav13

charlesaurav13 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Added the DCO remediation commit with the exact hash (586...........). Should be clear now.

@ceberam
ceberam merged commit 8d747a3 into docling-project:main Jun 26, 2026
26 checks passed
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.

CLI audio transcription output does not display active input filename

4 participants