ISpeechToTextProvider.php 508 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\SpeechToText;
  8. use OCP\Files\File;
  9. use RuntimeException;
  10. /**
  11. * @since 27.0.0
  12. */
  13. interface ISpeechToTextProvider {
  14. /**
  15. * @since 27.0.0
  16. */
  17. public function getName(): string;
  18. /**
  19. * @since 27.0.0
  20. * @throws RuntimeException If the text could not be transcribed
  21. */
  22. public function transcribeFile(File $file): string;
  23. }