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) ...@@ -863,7 +863,11 @@ void TextBasedEdit::slotProcessSpeechStatus(int, QProcess::ExitStatus status)
if (status == QProcess::CrashExit) { if (status == QProcess::CrashExit) {
showMessage(i18n("Speech recognition aborted."), KMessageWidget::Warning, m_errorString.isEmpty() ? nullptr : m_logAction); showMessage(i18n("Speech recognition aborted."), KMessageWidget::Warning, m_errorString.isEmpty() ? nullptr : m_logAction);
} else if (m_visualEditor->toPlainText().isEmpty()) { } else if (m_visualEditor->toPlainText().isEmpty()) {
showMessage(i18n("No speech detected."), KMessageWidget::Information, m_errorString.isEmpty() ? nullptr : m_logAction); 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 { } else {
button_add->setEnabled(true); button_add->setEnabled(true);
showMessage(i18n("Speech recognition finished."), KMessageWidget::Positive); 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