File indexing completed on 2024-12-22 04:28:23

0001 /*
0002   SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "speechtotext/speechtotextclient.h"
0010 
0011 class VoskSpeechToTextClient : public TextSpeechToText::SpeechToTextClient
0012 {
0013     Q_OBJECT
0014     Q_PLUGIN_METADATA(IID "org.kde.texttospeech.vosk")
0015     Q_INTERFACES(TextSpeechToText::SpeechToTextClient)
0016 public:
0017     explicit VoskSpeechToTextClient(QObject *parent = nullptr);
0018     ~VoskSpeechToTextClient() override;
0019 
0020     [[nodiscard]] QString name() const override;
0021     [[nodiscard]] QString translatedName() const override;
0022 
0023     [[nodiscard]] TextSpeechToText::SpeechToTextClient::EngineType engineType() const override;
0024 
0025     [[nodiscard]] TextSpeechToText::SpeechToTextPlugin *createTextToSpeech() override;
0026 
0027     [[nodiscard]] bool hasConfigurationDialog() const override;
0028     [[nodiscard]] bool showConfigureDialog(QWidget *parentWidget) override;
0029 };