mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 21:50:28 +02:00
Merge branch 'denizsafak:main' into main
This commit is contained in:
+1
-6
@@ -1,6 +1 @@
|
||||
- Merge pull request [#7](https://github.com/denizsafak/abogen/pull/7) by [@jborza](https://github.com/jborza) that improves voice preview and documentation.
|
||||
- Fixed the issue when a voice is selected, the voice mixer tries to pre-select that voice and ignores existing profiles.
|
||||
- Fixed the error while renaming the default "New profile" in the voice mixer.
|
||||
- Fixed subtitle_combo enabling/disabling when a voice in the voice mixer is selected.
|
||||
- Prevented using special characters in the profile name to avoid conflicts.
|
||||
- Improved invalid profile handling in the voice mixer.
|
||||
- Better approach for detemining the correct configuration folder for Linux and MacOS, using platformdirs.
|
||||
@@ -90,7 +90,7 @@ Here’s Abogen in action: in this demo, it processes ∼3,000 characters of tex
|
||||
- **Chapter Control**: Select specific `chapters` from ePUBs or `chapters + pages` from PDFs.
|
||||
- **Options**:
|
||||
- **Replace single newlines with spaces**: Replaces single newlines with spaces in the text. This is useful for texts that have imaginary line breaks.
|
||||
- **Configure max words per subtitle**: Automatically configures the maximum number of words per subtitle entry.
|
||||
- **Configure max words per subtitle**: Configures the maximum number of words per subtitle entry.
|
||||
- **Create desktop shortcut**: Creates a shortcut on your desktop for easy access.
|
||||
- **Open config.json directory**: Opens the directory where the configuration file is stored.
|
||||
- **Open temp directory**: Opens the temporary directory where converted text files are stored.
|
||||
@@ -103,6 +103,30 @@ Here’s Abogen in action: in this demo, it processes ∼3,000 characters of tex
|
||||
|
||||
With voice mixer, you can create custom voices by mixing different voice models. You can adjust the weight of each voice and save your custom voice as a profile for future use. The voice mixer allows you to create unique and personalized voices. (Huge thanks to [@jborza](https://github.com/jborza) for making this possible through his contributions in [#5](https://github.com/denizsafak/abogen/pull/5))
|
||||
|
||||
## `About Chapter Markers`
|
||||
When you process ePUB or PDF files, abogen converts them into text files stored in your temporary directory. When you click "Edit," you're actually modifying these converted text files. In these text files, you'll notice tags that look like this:
|
||||
|
||||
```
|
||||
<CHAPTER_MARKER:Chapter Title>
|
||||
```
|
||||
These are chapter markers. They are automatically added when you process ePUB or PDF files, based on the chapters you select. They serve an important purpose:
|
||||
- Allow you to split the text into separate audio files for each chapter
|
||||
- Save time by letting you reprocess only specific chapters if errors occur, rather than the entire file
|
||||
|
||||
You can manually add these markers to plain text files for the same benefits. Simply include them in your text like this:
|
||||
|
||||
```
|
||||
<CHAPTER_MARKER:Introduction>
|
||||
This is the beginning of my text...
|
||||
|
||||
<CHAPTER_MARKER:Main Content>
|
||||
Here's another part...
|
||||
```
|
||||
When you process the text file, abogen will detect these markers automatically and ask if you want to save each chapter separately and create a merged version.
|
||||
|
||||

|
||||
|
||||
|
||||
## `Supported Languages`
|
||||
```
|
||||
# 🇺🇸 'a' => American English, 🇬🇧 'b' => British English
|
||||
|
||||
+13
-2
@@ -1417,7 +1417,6 @@ class abogen(QWidget):
|
||||
if self.preview_playing:
|
||||
try:
|
||||
import pygame
|
||||
|
||||
pygame.mixer.music.stop()
|
||||
except Exception:
|
||||
pass
|
||||
@@ -1432,7 +1431,19 @@ class abogen(QWidget):
|
||||
self.voice_combo.setEnabled(False)
|
||||
self.btn_voice_formula_mixer.setEnabled(False) # Disable mixer button
|
||||
self.btn_start.setEnabled(False) # Disable start button during preview
|
||||
# start loading animation
|
||||
|
||||
# Start loading animation - ensure signal connection is always active
|
||||
if hasattr(self, 'loading_movie'):
|
||||
# Disconnect previous connections to avoid multiple connections
|
||||
try:
|
||||
self.loading_movie.frameChanged.disconnect()
|
||||
except TypeError:
|
||||
pass # Ignore error if not connected
|
||||
|
||||
# Reconnect the signal
|
||||
self.loading_movie.frameChanged.connect(
|
||||
lambda: self.btn_preview.setIcon(QIcon(self.loading_movie.currentPixmap()))
|
||||
)
|
||||
self.loading_movie.start()
|
||||
|
||||
def pipeline_loaded_callback(np_module, kpipeline_class, error):
|
||||
|
||||
+3
-4
@@ -66,10 +66,9 @@ def get_version():
|
||||
|
||||
# Define config path
|
||||
def get_user_config_path():
|
||||
if os.name == "nt":
|
||||
config_dir = os.path.join(os.environ["APPDATA"], "abogen")
|
||||
else:
|
||||
config_dir = os.path.join(os.path.expanduser("~"), ".config", "abogen")
|
||||
from platformdirs import user_config_dir
|
||||
# Use platformdirs to get the user configuration directory
|
||||
config_dir = user_config_dir("abogen", appauthor=False, roaming=True)
|
||||
os.makedirs(config_dir, exist_ok=True)
|
||||
return os.path.join(config_dir, "config.json")
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
import json
|
||||
from utils import get_user_config_path, get_resource_path
|
||||
from utils import get_user_config_path
|
||||
|
||||
|
||||
def _get_profiles_path():
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user