forked from opencast/opencast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix concurrency problem in Whisper integration
The SpeechToTextService interface ensures that a unique file is passed to transcription engines which these can safely use to store output files. Unfortunately, most Whisper implementations work slightly different and you cannot specify a single output file. That is probably why the Whisper engine throes the safe file name overboard and just uses the parent directly to store files. This has the side-effect that if `mediapackage-a/presenter.mp4` and `mediapackage-b/presenter.mp4` are processed concurrently, both write to the same file and an incorrect output file will end up being attached to one of the media packages. This patch fixes that problem by creating an unique directory instead and passing that to the engines to operate in. This also fixes the problem that most Whisper implementations create many more output files which whould have never been deleted before, slowly filling up the workspace.
- Loading branch information
Showing
4 changed files
with
53 additions
and
56 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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