Skip to content

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

Open
charlesaurav13 wants to merge 3 commits into
docling-project:mainfrom
charlesaurav13:fix/cli-log-active-filename
Open

fix(asr): log active audio filename in AsrPipeline._build_document#3535
charlesaurav13 wants to merge 3 commits into
docling-project:mainfrom
charlesaurav13:fix/cli-log-active-filename

Conversation

@charlesaurav13

Copy link
Copy Markdown

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 Failed

Hi @charlesaurav13, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for Saurav Pandey <sauravp1236@gmail.com>

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

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

@mergify

mergify Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

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
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
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.

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

2 participants