Skip to content

Commit 893383f

Browse files
committed
Ver 1.2.1: Config add python-path
1 parent 7822d17 commit 893383f

4 files changed

Lines changed: 10 additions & 5 deletions

File tree

fish/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ class Config:
2222
backend: str = "http://localhost:8080/v1/tts"
2323
ref_id: str = ""
2424
save_path: str = str(Path.cwd() / "output")
25+
python_path: str = (
26+
str(Path.cwd() / "fishenv" / "env" / "python.exe")
27+
if sys.platform == "win32"
28+
else "python"
29+
)
2530

2631
input_device: str | None = None
2732
output_device: str | None = None

fish/fap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ def setup_fap_transcribe_settings(self, layout: QVBoxLayout):
733733
)
734734
self.num_workers_spin = QSpinBox()
735735
self.num_workers_spin.setRange(1, 64)
736-
self.num_workers_spin.setValue(2)
736+
self.num_workers_spin.setValue(1)
737737
row_layout.addWidget(self.num_workers_spin, 1, *LINE_ALLOC[2][1])
738738

739739
# Language

fish/gui.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ def setup_backend_settings(self, layout: QVBoxLayout):
601601
self.python.setMinimumWidth(75)
602602
self.python.setPlaceholderText(_t("backend.python_info"))
603603
self.python.setToolTip(_t("backend.python_tooltip"))
604-
self.python.setText("python")
604+
self.python.setText(config.python_path)
605605
row.addWidget(self.python, 0, 1)
606606

607607
self.select_py_button = QPushButton(_t("backend.select_py"))
@@ -731,7 +731,7 @@ def select_python(self):
731731
self.python.setText(file)
732732
QMessageBox.information(self, "OK", f"Selected a Python interpreter.")
733733
else:
734-
self.python.setText("python")
734+
self.python.setText(config.python_path)
735735
QMessageBox.warning(
736736
self, "No Python Selected", "Fallback: built-in python interpreter."
737737
)
@@ -805,7 +805,7 @@ def save_config(self, save_to_file=True):
805805
config.volume = self.volume_slider.value()
806806
config.font_size = self.text_editor.font_size_spin.value()
807807
config.font_family = self.text_editor.font_combo.currentText()
808-
808+
config.python_path = self.python.text()
809809
save_config()
810810

811811
# pop up a message box to tell user if they want to save the config to a file

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "fish-speech-gui"
3-
version = "1.2.0"
3+
version = "1.2.1"
44
description = "fish-speech comfortable GUI"
55
readme = "README.md"
66
requires-python = "<3.12,>=3.10"

0 commit comments

Comments
 (0)