diff options
author | Marcel Klehr <mklehr@gmx.net> | 2024-07-31 11:05:25 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2024-07-31 12:43:05 +0200 |
commit | 5e4200853fe0bf2eb5e88254998ce337e2dca2ed (patch) | |
tree | 228421e4e902acf257efe22157ff74c23949d511 /lib/private/TaskProcessing/Manager.php | |
parent | 6a0edef4dab3029d49ce5fbf03103ba2e01c8d2d (diff) | |
download | nextcloud-server-5e4200853fe0bf2eb5e88254998ce337e2dca2ed.tar.gz nextcloud-server-5e4200853fe0bf2eb5e88254998ce337e2dca2ed.zip |
fix(TaskProcessing): Legacy Speech To Text support needs UserId
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
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 cb1e4e1e041..f2c8e41946a 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), |