diff options
author | Marcel Klehr <mklehr@gmx.net> | 2024-08-01 09:04:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-01 09:04:15 +0200 |
commit | c4227ef448f90c5d26051f430ff89747e4e79b4f (patch) | |
tree | a0b84294d5ebd0b9e773c62b376b9c1e19da69df /lib/private/TaskProcessing/Manager.php | |
parent | 5d98b647d67d1db04fc4cefb72e866a96a4ec11e (diff) | |
parent | 5e4200853fe0bf2eb5e88254998ce337e2dca2ed (diff) | |
download | nextcloud-server-c4227ef448f90c5d26051f430ff89747e4e79b4f.tar.gz nextcloud-server-c4227ef448f90c5d26051f430ff89747e4e79b4f.zip |
Merge pull request #46912 from nextcloud/fix/taskprocessing-speech-to-text-legacy
More fixes for task processing
Diffstat (limited to 'lib/private/TaskProcessing/Manager.php')
-rw-r--r-- | lib/private/TaskProcessing/Manager.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php index dbb85e50637..a804115a631 100644 --- a/lib/private/TaskProcessing/Manager.php +++ b/lib/private/TaskProcessing/Manager.php @@ -392,6 +392,9 @@ class Manager implements IManager { } public function process(?string $userId, array $input, callable $reportProgress): array { + if ($this->provider instanceof \OCP\SpeechToText\ISpeechToTextProviderWithUserId) { + $this->provider->setUserId($userId); + } try { $result = $this->provider->transcribeFile($input['input']); } catch (\RuntimeException $e) { @@ -483,6 +486,7 @@ class Manager implements IManager { \OCP\TaskProcessing\TaskTypes\TextToTextSimplification::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextSimplification::class), \OCP\TaskProcessing\TaskTypes\TextToTextChat::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextChat::class), \OCP\TaskProcessing\TaskTypes\TextToTextTranslate::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextTranslate::class), + \OCP\TaskProcessing\TaskTypes\TextToTextReformulation::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextReformulation::class), \OCP\TaskProcessing\TaskTypes\TextToImage::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToImage::class), \OCP\TaskProcessing\TaskTypes\AudioToText::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\AudioToText::class), \OCP\TaskProcessing\TaskTypes\ContextWrite::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\ContextWrite::class), |