RE
Add parameter maxLength to transcribe
remotion-dev/remotion#3703

Fixes #3688

This PR adds the possibility to configure the max-length parameter that is passed to whisper.cpp (previously hard coded to 1).

The function transcribe now also accepts a parameter maxLength.

The parameter can only be also be set to null, to use whisper.cpp’s default token grouping (useful for generating a movie-style transcription).

Backwards compatibility

The function is backward compatible. If maxLength is not provided, a default value of 1 is used (same behaviour as before)

Note

Since convertToCaptions groups the transcription-items and not the tokens, the parameter maxLength can now only be used when tokenLevelTimestamps is set false.

Question: Would tokensPerTranscriptionItem be a batter/more accurate name?

/claim 3688

Claim

Total prize pool $100
Total paid $100
Status Approved
Submitted April 11, 2024
Last updated April 12, 2024

Contributors

JO

Josef Bender

@youssefbenlemlih

100%

Sponsors

RE

Remotion

@remotion

$100 paid