KTextAddons

speechtotextengineloader.h
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "textspeechtotext_export.h"
10#include <QObject>
11#include <memory>
12namespace TextSpeechToText
13{
14class SpeechToTextEngineLoaderPrivate;
15class SpeechToTextClient;
16/**
17 * @brief The SpeechToTextEngineLoader class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class TEXTSPEECHTOTEXT_EXPORT SpeechToTextEngineLoader : public QObject
21{
22 Q_OBJECT
23public:
24 static SpeechToTextEngineLoader *self();
25
26 explicit SpeechToTextEngineLoader(QObject *parent = nullptr);
28
29 [[nodiscard]] TextSpeechToText::SpeechToTextClient *createSpeechToTextClient(const QString &clientName);
30
31 [[nodiscard]] bool hasConfigurationDialog(const QString &clientName) const;
32
33 [[nodiscard]] bool showConfigureDialog(const QString &clientName, QWidget *parentWidget);
34
35 [[nodiscard]] QMap<QString, QString> speechToTextEngineInfos() const;
36
37 [[nodiscard]] QString fallbackFirstEngine() const;
38
39 [[nodiscard]] bool hasEngine() const;
40
41Q_SIGNALS:
42 void loadingSpeechToTextFailed();
43 void noPluginsFound();
44
45private:
46 TEXTSPEECHTOTEXT_NO_EXPORT void loadPlugins();
47 TEXTSPEECHTOTEXT_NO_EXPORT void loadPlugin(const QString &pluginPath);
48 std::unique_ptr<SpeechToTextEngineLoaderPrivate> const d;
49};
50}
The SpeechToTextClient class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:47:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.