From a2f5421fc3eb13ed28167e97483fa7eaa4e65841 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Wed, 19 Apr 2023 12:35:13 +0200 Subject: SpeechToTextManager#scheduleFileTranscription: Take context params and expose them on the Transcription*Events Signed-off-by: Marcel Klehr --- lib/private/SpeechToText/SpeechToTextManager.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/private/SpeechToText/SpeechToTextManager.php') diff --git a/lib/private/SpeechToText/SpeechToTextManager.php b/lib/private/SpeechToText/SpeechToTextManager.php index d6f7e74c95e..95208e5b0ca 100644 --- a/lib/private/SpeechToText/SpeechToTextManager.php +++ b/lib/private/SpeechToText/SpeechToTextManager.php @@ -90,12 +90,17 @@ class SpeechToTextManager implements ISpeechToTextManager { return !empty($context->getSpeechToTextProviders()); } - public function scheduleFileTranscription(File $file): void { + public function scheduleFileTranscription(File $file, string $userId, string $appId): void { if (!$this->hasProviders()) { throw new PreConditionNotMetException('No SpeechToText providers have been registered'); } try { - $this->jobList->add(TranscriptionJob::class, ['fileId' => $file->getId(), 'owner' => $file->getOwner()->getUID()]); + $this->jobList->add(TranscriptionJob::class, [ + 'fileId' => $file->getId(), + 'owner' => $file->getOwner()->getUID(), + 'userId' => $userId, + 'appId' => $appId, + ]); } catch (NotFoundException|InvalidPathException $e) { throw new InvalidArgumentException('Invalid file provided for file transcription: ' . $e->getMessage()); } -- cgit v1.2.3