Commit e5621010 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Show error if speech modules were removed since last run

parent 2b58a79f
......@@ -863,7 +863,11 @@ void TextBasedEdit::slotProcessSpeechStatus(int, QProcess::ExitStatus status)
if (status == QProcess::CrashExit) {
showMessage(i18n("Speech recognition aborted."), KMessageWidget::Warning, m_errorString.isEmpty() ? nullptr : m_logAction);
} else if (m_visualEditor->toPlainText().isEmpty()) {
if (m_errorString.contains(QStringLiteral("ModuleNotFoundError"))) {
showMessage(i18n("Error, please check the speech to text configuration."), KMessageWidget::Warning, m_voskConfig);
} else {
showMessage(i18n("No speech detected."), KMessageWidget::Information, m_errorString.isEmpty() ? nullptr : m_logAction);
} else {
showMessage(i18n("Speech recognition finished."), KMessageWidget::Positive);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment