Fix Mistral transcription requests#671
Open
NoelDeMartin wants to merge 1 commit into
Open
Conversation
This fixes a regression caused in laravel/framework v13.9.0 (PR laravel/framework#59984)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I recently upgraded my laravel/framework version, and I started getting errors from Mistral's transcription API. In particular, I got the following:
{ "object": "error", "message": { "detail": [ { "type": "assertion_error", "loc": [], "msg": "Assertion failed, When diarize is set to True and streaming is disabled, the timestamp granularity must be set to ['segment'], got []", "input": { "model": "voxtral-mini-latest", "audio": "--audio-bytes--", "language": null, "temperature": null, "max_tokens": null, "stream": false, "return_language": false, "streaming": "disabled", "timestamp_granularities": [], "diarize": true, "context_bias": [], "target_streaming_delay_ms": null, "metadata": null }, "ctx": { "error": {} } } ] }, "type": "invalid_request_error", "param": null, "code": null, "raw_status_code": 422 }Looking at the code, I was confused because the
timestamp_granularitiesseems to be set to "segments" in the code... but after some digging, I could trace back the regression to a recent PR in laravel/framework: laravel/framework#59984This was released in
v13.9.0, and I'm not sure how many things are broken because of that. At the very least, this PR fixes Mistral's transcriptions.I have reported this issue to laravel/framework in case you want to take a look at a more general fix: laravel/framework#60319