KTextAddons

voskengineutils.h
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#pragma once
7
8#include "libvoskspeechtotext_export.h"
9#include <QDebug>
10#include <QString>
11
12namespace VoskEngineUtils
13{
14[[nodiscard]] LIBVOSKSPEECHTOTEXT_EXPORT QString defaultVoskRepository();
15[[nodiscard]] LIBVOSKSPEECHTOTEXT_EXPORT QString storageLanguagePath();
16
17struct LIBVOSKSPEECHTOTEXT_EXPORT LanguageInstalled {
19 QString absoluteLanguageModelPath;
20 QString url;
21 QString versionStr;
22 [[nodiscard]] bool operator==(const LanguageInstalled &other) const;
23 [[nodiscard]] bool isValid() const;
24};
25
26[[nodiscard]] LIBVOSKSPEECHTOTEXT_EXPORT VoskEngineUtils::LanguageInstalled loadInstalledLanguageInfo(const QString &modelInfoPath);
27
28[[nodiscard]] LIBVOSKSPEECHTOTEXT_EXPORT bool createInstalledLanguageInfo(const QString &modelInfoPath, const LanguageInstalled &installed);
29
30[[nodiscard]] LIBVOSKSPEECHTOTEXT_EXPORT QVector<LanguageInstalled> languageLocallyStored(const QString &path = {});
31
32[[nodiscard]] LIBVOSKSPEECHTOTEXT_EXPORT QString defaultLanguage();
33
34LIBVOSKSPEECHTOTEXT_EXPORT void saveSettings();
35LIBVOSKSPEECHTOTEXT_EXPORT void loadSettings();
36};
37LIBVOSKSPEECHTOTEXT_EXPORT QDebug operator<<(QDebug d, const VoskEngineUtils::LanguageInstalled &t);
38Q_DECLARE_TYPEINFO(VoskEngineUtils::LanguageInstalled, Q_MOVABLE_TYPE);
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
QString name(GameStandardAction id)
bool isValid(QStringView ifopt)
bool operator==(const StyleDelim &l, const StyleDelim &r)
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.