Update lib/private/SpeechToText/SpeechToTextManager.php

Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2023-04-17 15:49:50 +02:00 committed by GitHub
parent 3779cc3d88
commit 6e9f260348
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,9 +94,6 @@ class SpeechToTextManager implements ISpeechToTextManager {
throw new PreConditionNotMetException('No SpeechToText providers have been registered');
}
try {
if ($this->jobList->has(TranscriptionJob::class, ['fileId' => $file->getId()])) {
return;
}
$this->jobList->add(TranscriptionJob::class, ['fileId' => $file->getId()]);
} catch (NotFoundException|InvalidPathException $e) {
throw new InvalidArgumentException('Invalid file provided for file transcription: ' . $e->getMessage());