TranscriptionSuccessfulEvent.php 798 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\SpeechToText\Events;
  8. use OCP\Files\File;
  9. /**
  10. * This Event is emitted when a transcription of a media file happened successfully
  11. * @since 27.0.0
  12. * @deprecated 30.0.0
  13. */
  14. class TranscriptionSuccessfulEvent extends AbstractTranscriptionEvent {
  15. /**
  16. * @since 27.0.0
  17. */
  18. public function __construct(
  19. int $fileId,
  20. ?File $file,
  21. private string $transcript,
  22. ?string $userId,
  23. string $appId,
  24. ) {
  25. parent::__construct($fileId, $file, $userId, $appId);
  26. }
  27. /**
  28. * @since 27.0.0
  29. * @return string The transcript of the media file
  30. */
  31. public function getTranscript(): string {
  32. return $this->transcript;
  33. }
  34. }