Merge pull request #7 from jborza/main

Updated development instructions in README
This commit is contained in:
Deniz Şafak
2025-05-02 20:17:17 +03:00
committed by GitHub
2 changed files with 11 additions and 2 deletions
+1
View File
@@ -160,6 +160,7 @@ If you'd like to modify the code and contribute to development, you can [downloa
```bash ```bash
# Go to the directory where you extracted the repository and run: # Go to the directory where you extracted the repository and run:
pip install -e . # Installs the package in editable mode pip install -e . # Installs the package in editable mode
pip install build # Install the build package
python -m build # Builds the package in dist folder (optional) python -m build # Builds the package in dist folder (optional)
abogen # Opens the GUI abogen # Opens the GUI
``` ```
+10 -2
View File
@@ -1480,8 +1480,11 @@ class abogen(QWidget):
lang = self.selected_voice[0] lang = self.selected_voice[0]
voice = self.selected_voice voice = self.selected_voice
# use same gpu/cpu logic as in conversion
gpu_msg, gpu_ok = get_gpu_acceleration(self.use_gpu)
self.preview_thread = VoicePreviewThread( self.preview_thread = VoicePreviewThread(
np_module, kpipeline_class, lang, voice, speed, self.use_gpu np_module, kpipeline_class, lang, voice, speed, gpu_ok
) )
self.preview_thread.finished.connect(self._play_preview_audio) self.preview_thread.finished.connect(self._play_preview_audio)
self.preview_thread.error.connect(self._preview_error) self.preview_thread.error.connect(self._preview_error)
@@ -1545,7 +1548,12 @@ class abogen(QWidget):
def _preview_cleanup(self): def _preview_cleanup(self):
self.preview_playing = False self.preview_playing = False
self.btn_preview.setIcon(self.play_icon) self.loading_movie.stop()
try:
self.loading_movie.frameChanged.disconnect()
except Exception:
pass # Ignore error if not connected
self.btn_preview.setIcon(self.play_icon)
self.btn_preview.setToolTip("Preview selected voice") self.btn_preview.setToolTip("Preview selected voice")
self.btn_preview.setEnabled(True) self.btn_preview.setEnabled(True)
self.voice_combo.setEnabled(True) self.voice_combo.setEnabled(True)