MCPcopy Create free account
hub / github.com/KDE/kdenlive / venvPythonExecs

Method venvPythonExecs

src/pythoninterfaces/speechtotext.cpp:59–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59AbstractPythonInterface::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
81bool SpeechToText::useSystemPython()
82{

Callers 6

pythonReadyMethod · 0.45
launchSamMethod · 0.45
processDownloadMethod · 0.45
startRecognitionMethod · 0.45
slotProcessSpeechMethod · 0.45
checkSamEnvironementMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected