From 176f1af26a6bf7c62cadd04448b73839296653c0 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 13 Apr 2023 11:57:23 +0200 Subject: ISpeechToTextManager: Take File as input, drop $context Signed-off-by: Marcel Klehr --- lib/public/SpeechToText/ISpeechToTextManager.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/public/SpeechToText') 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; } -- cgit v1.2.3