Skip to content

fix(audio): honor the selected transcription client without provider fallback - #2706

Open
Çağdaş Yürekli (cagdasyurekli) wants to merge 1 commit into
microsoft:mainfrom
cagdasyurekli:fix/audio-client-routing-1284-20261015
Open

Çağdaş Yürekli (cagdasyurekli) wants to merge 1 commit into
microsoft:mainfrom
cagdasyurekli:fix/audio-client-routing-1284-20261015

Conversation

@cagdasyurekli

Copy link
Copy Markdown
Contributor

When MarkItDown(llm_client=client) converts audio, the built-in converter ignores the selected client and sends the recording through SpeechRecognition's legacy Google service. Honor the explicitly selected OpenAI-compatible audio transcription client instead, with no cross-provider fallback on provider failure.

The selected client receives the original encoded stream with its matching filename and MIME type (audio/mpeg for MP3), using whisper-1. This path does not require legacy SpeechRecognition or local decoding dependencies. The existing no-client Google default and its language hint remain compatible and are now documented explicitly.

Addresses the configured-client part of #1284. This is a focused current-main alternative to the stale/conflicting #326; unlike its fallback behavior, a selected provider stays selected when it fails. It does not close the broader policy question about the no-client Google default.

Validation on Python 3.12: 8 new cases fail against unchanged main, then all 9 provider-selection/format cases pass; full core suite 1,059 passed, 57 skipped under existing CI skip conditions. Black 23.7.0 and diff checks pass. Independent OpenAI SDK multipart checks verify original audio bytes, filename/MIME and absence of SpeechRecognition; all provider requests are mocked and no recording leaves the test process.

Net change: +19 production lines, +103 test lines, +14 documentation lines. No dependencies, CLI flags or hosted workflows added.

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.

1 participant