aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TaskProcessing/Manager.php
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2024-08-01 09:04:15 +0200
committerGitHub <noreply@github.com>2024-08-01 09:04:15 +0200
commitc4227ef448f90c5d26051f430ff89747e4e79b4f (patch)
treea0b84294d5ebd0b9e773c62b376b9c1e19da69df /lib/private/TaskProcessing/Manager.php
parent5d98b647d67d1db04fc4cefb72e866a96a4ec11e (diff)
parent5e4200853fe0bf2eb5e88254998ce337e2dca2ed (diff)
downloadnextcloud-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.php4
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),