Skip to content

Commit c4227ef

Browse files
authored
Merge pull request #46912 from nextcloud/fix/taskprocessing-speech-to-text-legacy
More fixes for task processing
2 parents 5d98b64 + 5e42008 commit c4227ef

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/private/TaskProcessing/Manager.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ public function getOptionalOutputShape(): array {
392392
}
393393

394394
public function process(?string $userId, array $input, callable $reportProgress): array {
395+
if ($this->provider instanceof \OCP\SpeechToText\ISpeechToTextProviderWithUserId) {
396+
$this->provider->setUserId($userId);
397+
}
395398
try {
396399
$result = $this->provider->transcribeFile($input['input']);
397400
} catch (\RuntimeException $e) {
@@ -483,6 +486,7 @@ private function _getTaskTypes(): array {
483486
\OCP\TaskProcessing\TaskTypes\TextToTextSimplification::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextSimplification::class),
484487
\OCP\TaskProcessing\TaskTypes\TextToTextChat::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextChat::class),
485488
\OCP\TaskProcessing\TaskTypes\TextToTextTranslate::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextTranslate::class),
489+
\OCP\TaskProcessing\TaskTypes\TextToTextReformulation::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToTextReformulation::class),
486490
\OCP\TaskProcessing\TaskTypes\TextToImage::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\TextToImage::class),
487491
\OCP\TaskProcessing\TaskTypes\AudioToText::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\AudioToText::class),
488492
\OCP\TaskProcessing\TaskTypes\ContextWrite::ID => \OCP\Server::get(\OCP\TaskProcessing\TaskTypes\ContextWrite::class),

0 commit comments

Comments
 (0)