aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/TaskProcessing
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2024-05-13 11:50:14 +0200
committerMarcel Klehr <mklehr@gmx.net>2024-05-14 11:38:42 +0200
commit8d063386d21fb41f9efba11d35c35dd8edde1c19 (patch)
tree96b71083adbda398e4b79b5e83b15c8bc4ecc1e0 /lib/private/TaskProcessing
parent9864fc8bfa93bca8ca0cf25185310ac90f4e108b (diff)
downloadnextcloud-server-8d063386d21fb41f9efba11d35c35dd8edde1c19.tar.gz
nextcloud-server-8d063386d21fb41f9efba11d35c35dd8edde1c19.zip
fix: Fix pass-through stt provider
Wasn't able to load File from app data Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/private/TaskProcessing')
-rw-r--r--lib/private/TaskProcessing/Manager.php15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/private/TaskProcessing/Manager.php b/lib/private/TaskProcessing/Manager.php
index 956f708f09a..f72d86bb97e 100644
--- a/lib/private/TaskProcessing/Manager.php
+++ b/lib/private/TaskProcessing/Manager.php
@@ -348,20 +348,7 @@ class Manager implements IManager {
public function process(?string $userId, array $input, callable $reportProgress): array {
try {
- $folder = $this->appData->getFolder('audio2text');
- } catch(\OCP\Files\NotFoundException) {
- $folder = $this->appData->newFolder('audio2text');
- }
- /** @var SimpleFile $simpleFile */
- $simpleFile = $folder->newFile(time() . '-' . rand(0, 100000), $input['input']->getContent());
- $id = $simpleFile->getId();
- /** @var File $file */
- $file = current($this->rootFolder->getById($id));
- if ($this->provider instanceof ISpeechToTextProviderWithUserId) {
- $this->provider->setUserId($userId);
- }
- try {
- $result = $this->provider->transcribeFile($file);
+ $result = $this->provider->transcribeFile($input['input']);
} catch (\RuntimeException $e) {
throw new ProcessingException($e->getMessage(), 0, $e);
}