diff options
| -rw-r--r-- | GUI/GUI/GUI/Frame.cpp | 14 | ||||
| -rw-r--r-- | GUI/GUI/GUI/PythonWrapper.cpp | 31 | ||||
| -rw-r--r-- | GUI/package.ps1 | 5 | ||||
| -rw-r--r-- | Scripts/requirements.txt | 4 | ||||
| m--------- | TaSTT-Whisper | 0 |
5 files changed, 7 insertions, 47 deletions
diff --git a/GUI/GUI/GUI/Frame.cpp b/GUI/GUI/GUI/Frame.cpp index eef8251..deccb52 100644 --- a/GUI/GUI/GUI/Frame.cpp +++ b/GUI/GUI/GUI/Frame.cpp @@ -1654,20 +1654,6 @@ void Frame::OnSetupPython(wxCommandEvent& event) }
}
- {
- Log(transcribe_out_, " DEBUG: check sys.path\n");
- auto out_cb = [&](const std::string& out, const std::string& err) {
- Log(transcribe_out_, "{}", out);
- Log(transcribe_out_, "{}", err);
- };
- if (!PythonWrapper::InvokeWithArgs({
- "Resources/Scripts/tst.py",
- }, std::move(out_cb))) {
- Log(transcribe_out_, "Failed to check sys.path!\n");
- return false;
- }
- }
-
Log(transcribe_out_, " Installing dependencies\n");
auto out_cb = [&](const std::string& out, const std::string& err) {
Log(transcribe_out_, "{}", out);
diff --git a/GUI/GUI/GUI/PythonWrapper.cpp b/GUI/GUI/GUI/PythonWrapper.cpp index 54f6686..0337072 100644 --- a/GUI/GUI/GUI/PythonWrapper.cpp +++ b/GUI/GUI/GUI/PythonWrapper.cpp @@ -294,37 +294,6 @@ bool PythonWrapper::InvokeCommandWithArgs(const std::string& cmd, return false; } } - - // Set up PYTHONPATH - std::filesystem::path py_path = (std::filesystem::current_path() / - "Resources/Python").lexically_normal(); - std::filesystem::path py_lib = (std::filesystem::current_path() / - "Resources/Python/Lib").lexically_normal(); - std::filesystem::path py_site_pkgs = (std::filesystem::current_path() / - "Resources/Python/Lib/site-packages").lexically_normal(); - std::ostringstream pypath_oss; - pypath_oss << py_path.string(); - pypath_oss << ';' << py_lib.string(); - pypath_oss << ';' << py_site_pkgs.string(); - out_cb("PYTHONPATH=" + pypath_oss.str() + "\n", ""); - if (!SetEnvironmentVariableA("PYTHONPATH", pypath_oss.str().c_str())) { - std::ostringstream err_oss; - err_oss << "Error while executing python command \"" << cmd_oss.str() - << "\": Failed to add site-packages to PYTHONPATH: " - << GetWin32ErrMsg() << std::endl; - out_cb("", err_oss.str()); - return false; - } - // Set up PYTHONHOME - out_cb("PYTHONHOME=" + py_path.string() + "\n", ""); - if (!SetEnvironmentVariableA("PYTHONHOME", py_path.string().c_str())) { - std::ostringstream err_oss; - err_oss << "Error while executing python command \"" << cmd_oss.str() - << "\": Failed to set PYTHONHOME: " - << GetWin32ErrMsg() << std::endl; - out_cb("", err_oss.str()); - return false; - } } std::string cmd_str = cmd_oss.str(); diff --git a/GUI/package.ps1 b/GUI/package.ps1 index fa5e162..5f15259 100644 --- a/GUI/package.ps1 +++ b/GUI/package.ps1 @@ -6,6 +6,8 @@ param( echo "Skip zip: $skip_zip"
echo "Release: $release"
+$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
+
$install_dir = "TaSTT"
if (Test-Path $install_dir) {
@@ -28,7 +30,8 @@ if (-Not (Test-Path $py_dir)) { mkdir Python
Expand-Archive $PYTHON_FILE -DestinationPath Python
- rm Python/python310._pth
+ echo "../Scripts" >> Python/python310._pth
+ echo "import site" >> Python/python310._pth
}
$pip_path = "$py_dir/get-pip.py"
diff --git a/Scripts/requirements.txt b/Scripts/requirements.txt index 573f316..c218302 100644 --- a/Scripts/requirements.txt +++ b/Scripts/requirements.txt @@ -1,10 +1,12 @@ +editdistance future==0.18.2 openvr pillow pyaudio python-osc playsound==1.2.2 +pyyaml + --extra-index-url https://download.pytorch.org/whl/cu116 torch==1.13.1+cu116 git+https://github.com/openai/whisper.git -editdistance diff --git a/TaSTT-Whisper b/TaSTT-Whisper -Subproject 5e30b2366a4a320f59ed7e0bfcfe72f5f8c9d10 +Subproject aaa0188da81056748ef8ffcd5ad86d6f4bffa6b |
