| 57 | } |
| 58 | |
| 59 | AbstractPythonInterface::PythonExec SpeechToText::venvPythonExecs(bool checkPip) |
| 60 | { |
| 61 | if (KdenliveSettings::speech_system_python()) { |
| 62 | // Use system python for Speech plugin |
| 63 | #ifdef Q_OS_WIN |
| 64 | const QString pythonName = QStringLiteral("python"); |
| 65 | const QString pipName = QStringLiteral("pip"); |
| 66 | #else |
| 67 | const QString pythonName = QStringLiteral("python3"); |
| 68 | const QString pipName = QStringLiteral("pip3"); |
| 69 | #endif |
| 70 | const QStringList pythonPaths = {QFileInfo(KdenliveSettings::speech_system_python_path()).dir().absolutePath()}; |
| 71 | const QString pythonExe = QStandardPaths::findExecutable(pythonName, pythonPaths); |
| 72 | QString pipExe; |
| 73 | if (checkPip) { |
| 74 | pipExe = QStandardPaths::findExecutable(pipName, pythonPaths); |
| 75 | } |
| 76 | return {pythonExe, pipExe}; |
| 77 | } |
| 78 | return AbstractPythonInterface::venvPythonExecs(checkPip); |
| 79 | } |
| 80 | |
| 81 | bool SpeechToText::useSystemPython() |
| 82 | { |
no outgoing calls
no test coverage detected