diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index aed668ab..2ad79da3 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -4,15 +4,15 @@
use OCA\TPAssistant\Listener\BeforeTemplateRenderedListener;
use OCA\TPAssistant\Listener\FreePrompt\FreePromptReferenceListener;
+use OCA\TPAssistant\Listener\SpeechToText\SpeechToTextReferenceListener;
+use OCA\TPAssistant\Listener\SpeechToText\SpeechToTextResultListener;
use OCA\TPAssistant\Listener\TaskFailedListener;
use OCA\TPAssistant\Listener\TaskSuccessfulListener;
use OCA\TPAssistant\Listener\Text2Image\Text2ImageReferenceListener;
-use OCA\TPAssistant\Listener\SpeechToText\SpeechToTextResultListener;
-use OCA\TPAssistant\Listener\SpeechToText\SpeechToTextReferenceListener;
-use OCA\TPAssistant\Reference\SpeechToTextReferenceProvider;
use OCA\TPAssistant\Listener\Text2Image\Text2ImageResultListener;
use OCA\TPAssistant\Notification\Notifier;
use OCA\TPAssistant\Reference\FreePromptReferenceProvider;
+use OCA\TPAssistant\Reference\SpeechToTextReferenceProvider;
use OCA\TPAssistant\Reference\Text2ImageReferenceProvider;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
@@ -21,13 +21,12 @@
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
use OCP\Collaboration\Reference\RenderReferenceEvent;
+use OCP\SpeechToText\Events\TranscriptionFailedEvent;
+use OCP\SpeechToText\Events\TranscriptionSuccessfulEvent;
use OCP\TextProcessing\Events\TaskFailedEvent as TextTaskFailedEvent;
use OCP\TextProcessing\Events\TaskSuccessfulEvent as TextTaskSuccessfulEvent;
use OCP\TextToImage\Events\TaskFailedEvent as TextToImageTaskFailedEvent;
use OCP\TextToImage\Events\TaskSuccessfulEvent as TextToImageTaskSuccessfulEvent;
-use OCP\SpeechToText\Events\TranscriptionFailedEvent;
-use OCP\SpeechToText\Events\TranscriptionSuccessfulEvent;
-
class Application extends App implements IBootstrap {
diff --git a/lib/Controller/SpeechToTextController.php b/lib/Controller/SpeechToTextController.php
index 48b1500d..1fbb125d 100644
--- a/lib/Controller/SpeechToTextController.php
+++ b/lib/Controller/SpeechToTextController.php
@@ -20,7 +20,7 @@
* along with this program. If not, see .
*/
- namespace OCA\TPAssistant\Controller;
+namespace OCA\TPAssistant\Controller;
use DateTime;
use Exception;
diff --git a/lib/Db/SpeechToText/TranscriptMapper.php b/lib/Db/SpeechToText/TranscriptMapper.php
index edb875c1..6acb48c0 100644
--- a/lib/Db/SpeechToText/TranscriptMapper.php
+++ b/lib/Db/SpeechToText/TranscriptMapper.php
@@ -25,7 +25,7 @@
*
*/
- namespace OCA\TPAssistant\Db\SpeechToText;
+namespace OCA\TPAssistant\Db\SpeechToText;
use DateTime;
use Exception;
diff --git a/lib/Listener/SpeechToText/SpeechToTextReferenceListener.php b/lib/Listener/SpeechToText/SpeechToTextReferenceListener.php
index e9a7b6f3..cf3d9719 100644
--- a/lib/Listener/SpeechToText/SpeechToTextReferenceListener.php
+++ b/lib/Listener/SpeechToText/SpeechToTextReferenceListener.php
@@ -27,9 +27,9 @@
use OCP\Collaboration\Reference\RenderReferenceEvent;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
-use OCP\Util;
use OCP\IConfig;
use OCP\SpeechToText\ISpeechToTextManager;
+use OCP\Util;
/**
* @template-implements IEventListener
diff --git a/lib/Listener/SpeechToText/SpeechToTextResultListener.php b/lib/Listener/SpeechToText/SpeechToTextResultListener.php
index 158d475a..d6f4dfdf 100644
--- a/lib/Listener/SpeechToText/SpeechToTextResultListener.php
+++ b/lib/Listener/SpeechToText/SpeechToTextResultListener.php
@@ -22,7 +22,6 @@
namespace OCA\TPAssistant\Listener\SpeechToText;
-use DateTime;
use OCA\TPAssistant\AppInfo\Application;
use OCA\TPAssistant\Service\SpeechToText\SpeechToTextService;
use OCP\EventDispatcher\Event;
@@ -52,7 +51,7 @@ public function handle(Event $event): void {
$userId = $event->getUserId();
try {
- $this->sttService->sendSpeechToTextNotification($userId, $transcript,true);
+ $this->sttService->sendSpeechToTextNotification($userId, $transcript, true);
} catch (\InvalidArgumentException $e) {
$this->logger->error('Failed to dispatch notification for successful transcription: ' . $e->getMessage());
}
@@ -63,7 +62,7 @@ public function handle(Event $event): void {
$this->logger->error('Transcript generation failed: ' . $event->getErrorMessage());
try {
- $this->sttService->sendSpeechToTextNotification($userId, '',false);
+ $this->sttService->sendSpeechToTextNotification($userId, '', false);
} catch (\InvalidArgumentException $e) {
$this->logger->error('Failed to dispatch notification for failed transcription: ' . $e->getMessage());
}
diff --git a/lib/Service/AssistantService.php b/lib/Service/AssistantService.php
index 356288cb..34bdcbcd 100644
--- a/lib/Service/AssistantService.php
+++ b/lib/Service/AssistantService.php
@@ -5,13 +5,12 @@
use DateTime;
use OCA\TPAssistant\AppInfo\Application;
use OCP\Common\Exception\NotFoundException;
+use OCP\IURLGenerator;
use OCP\Notification\IManager as INotificationManager;
use OCP\PreConditionNotMetException;
use OCP\TextProcessing\IManager as ITextProcessingManager;
use OCP\TextProcessing\Task as TextProcessingTask;
use OCP\TextToImage\Task as TextToImageTask;
-use OCP\Notification\IManager as INotificationManager;
-use OCP\IURLGenerator;
class AssistantService {
diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php
index c4c6db75..257e2e9f 100644
--- a/lib/Settings/Admin.php
+++ b/lib/Settings/Admin.php
@@ -7,9 +7,9 @@
use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
use OCP\Settings\ISettings;
+use OCP\SpeechToText\ISpeechToTextManager;
use OCP\TextProcessing\FreePromptTaskType;
use OCP\TextProcessing\IManager as ITextProcessingManager;
-use OCP\SpeechToText\ISpeechToTextManager;
use OCP\TextToImage\IManager as ITextToImageManager;
diff --git a/lib/Settings/Personal.php b/lib/Settings/Personal.php
index 923fd570..058be5c4 100644
--- a/lib/Settings/Personal.php
+++ b/lib/Settings/Personal.php
@@ -7,9 +7,9 @@
use OCP\AppFramework\Services\IInitialState;
use OCP\IConfig;
use OCP\Settings\ISettings;
+use OCP\SpeechToText\ISpeechToTextManager;
use OCP\TextProcessing\FreePromptTaskType;
use OCP\TextProcessing\IManager as ITextProcessingManager;
-use OCP\SpeechToText\ISpeechToTextManager;
use OCP\TextToImage\IManager;
@@ -22,7 +22,7 @@ public function __construct(
private IManager $textToImageManager,
private ITextProcessingManager $textProcessingManager,
private ISpeechToTextManager $speechToTextManager,
- ) {
+ ) {
}
/**