Skip to content

Enable batched faster-whisper transcription#23

Open
LC-86 wants to merge 1 commit into
ivrit-ai:masterfrom
LC-86:codex/bounty-13-batch-transcription
Open

Enable batched faster-whisper transcription#23
LC-86 wants to merge 1 commit into
ivrit-ai:masterfrom
LC-86:codex/bounty-13-batch-transcription

Conversation

@LC-86
Copy link
Copy Markdown

@LC-86 LC-86 commented May 12, 2026

Summary

  • forward transcribe() kwargs to the faster-whisper backend
  • switch to BatchedInferencePipeline when batch_size > 1
  • document the new batching path and add focused unit tests

Root cause

The current FasterWhisperModel.transcribe_core() accepts **kwargs, but never forwards them to the backend call. This means options like batch_size, beam_size, or vad_filter are silently dropped.

Because of that, callers cannot activate faster-whisper's documented batched inference path through ivrit's public transcribe() API.

What changed

  • keep the existing single-file API unchanged
  • lazily instantiate faster_whisper.BatchedInferencePipeline when batch_size > 1
  • continue to use the plain WhisperModel path otherwise
  • pass transcription kwargs through to the backend call instead of dropping them

Validation

  • /Library/Frameworks/Python.framework/Versions/3.12/bin/pytest tests/test_batch_transcription.py -q
  • python3 -m py_compile ivrit/audio.py tests/test_batch_transcription.py
  • git diff --check

Notes

This is intentionally scoped to the faster-whisper path only. It does not try to redesign the API for multi-input batching yet; it enables the batching mechanism that faster-whisper already documents, through ivrit's existing transcribe() entrypoint.

Closes #13.

@LC-86
Copy link
Copy Markdown
Author

LC-86 commented May 13, 2026

Review note: I kept this intentionally narrow. The key behavioral change is that transcribe() now actually forwards batching-related kwargs into the faster-whisper path, and only switches to BatchedInferencePipeline when batch_size > 1. I also added focused tests for the previously dropped kwargs path and the batched pipeline selection. If you want, I can also add a short benchmark note in the PR description.

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.

[Bounty] Enable batch transcription

1 participant