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

Attempt to fix python scripts exec on Windows

parent 7beefdd4
Pipeline #52369 passed with stage
in 10 minutes and 28 seconds
......@@ -783,6 +783,14 @@ void TextBasedEdit::startRecognition()
}
m_speechJob.reset(new QProcess(this));
#ifdef Q_OS_WIN
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
QDir pythonDir(QFileInfo(pyExec).absolutePath());
env.insert("PYTHONHOME", pythonDir.absolutePath());
pythonDir.cd(QStringLiteral("Lib"));
env.insert("PYTHONPATH", pythonDir.absolutePath());
m_speechJob->setProcessEnvironment(env);
#endif
showMessage(i18n("Starting speech recognition"), KMessageWidget::Information);
qApp->processEvents();
QString modelDirectory = KdenliveSettings::vosk_folder_path();
......
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