diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-04-13 11:57:23 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-04-13 11:57:23 +0200 |
commit | 176f1af26a6bf7c62cadd04448b73839296653c0 (patch) | |
tree | f6a41de996752bead800a6bcec5a6cb2245e1fa4 /lib/public/SpeechToText | |
parent | ef7ce88cee47ec7d05c43e55c166f8488667dc5d (diff) | |
download | nextcloud-server-176f1af26a6bf7c62cadd04448b73839296653c0.tar.gz nextcloud-server-176f1af26a6bf7c62cadd04448b73839296653c0.zip |
ISpeechToTextManager: Take File as input, drop $context
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/public/SpeechToText')
-rw-r--r-- | lib/public/SpeechToText/ISpeechToTextManager.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/public/SpeechToText/ISpeechToTextManager.php b/lib/public/SpeechToText/ISpeechToTextManager.php index 7bcd60bce8c..430a6cbc450 100644 --- a/lib/public/SpeechToText/ISpeechToTextManager.php +++ b/lib/public/SpeechToText/ISpeechToTextManager.php @@ -27,6 +27,7 @@ declare(strict_types=1); namespace OCP\SpeechToText; use InvalidArgumentException; +use OCP\Files\File; use OCP\PreConditionNotMetException; use RuntimeException; @@ -50,13 +51,15 @@ interface ISpeechToTextManager { * @throws InvalidArgumentException If the file could not be found or is not of a supported type * @throws RuntimeException If the transcription failed for other reasons */ - public function scheduleFileTranscription(string $path, array $context): void; + public function scheduleFileTranscription(File $file): void; /** * @since 27.0.0 + * @param File $file The media file to transcribe + * @returns string The transcription of the the passed media file * @throws PreConditionNotMetException If no provider was registered but this method was still called * @throws InvalidArgumentException If the file could not be found or is not of a supported type * @throws RuntimeException If the transcription failed for other reasons */ - public function transcribeFile(string $path) : string; + public function transcribeFile(File $file) : string; } |