diff --git a/abogen/book_handler.py b/abogen/book_handler.py
index 05201ec..cb406d8 100644
--- a/abogen/book_handler.py
+++ b/abogen/book_handler.py
@@ -390,7 +390,7 @@ class HandlerDialog(QDialog):
from abogen.utils import load_config
cfg = load_config()
- replace_single_newlines = cfg.get("replace_single_newlines", False)
+ replace_single_newlines = cfg.get("replace_single_newlines", True)
cache_key = (self.book_path, mod_time, self.file_type, replace_single_newlines)
diff --git a/abogen/conversion.py b/abogen/conversion.py
index a4f10df..c0afb2b 100644
--- a/abogen/conversion.py
+++ b/abogen/conversion.py
@@ -2042,7 +2042,7 @@ class ConversionThread(QThread):
return
# Process text and timing
- replace_nl = getattr(self, "replace_single_newlines", False)
+ replace_nl = getattr(self, "replace_single_newlines", True)
processed_text = text.replace("\n", " ") if replace_nl else text
use_gaps = getattr(self, "use_silent_gaps", False)
next_start = (
diff --git a/abogen/gui.py b/abogen/gui.py
index 0093e67..929dee9 100644
--- a/abogen/gui.py
+++ b/abogen/gui.py
@@ -1912,7 +1912,7 @@ class abogen(QWidget):
and queued_item.output_folder == item_queue.output_folder
and queued_item.subtitle_mode == item_queue.subtitle_mode
and queued_item.output_format == item_queue.output_format
- and getattr(queued_item, "replace_single_newlines", False)
+ and getattr(queued_item, "replace_single_newlines", True)
== item_queue.replace_single_newlines
and getattr(queued_item, "save_base_path", None)
== item_queue.save_base_path
@@ -1977,7 +1977,7 @@ class abogen(QWidget):
self.selected_format = queued_item.output_format
self.char_count = queued_item.total_char_count
self.replace_single_newlines = getattr(
- queued_item, "replace_single_newlines", False
+ queued_item, "replace_single_newlines", True
)
self.use_silent_gaps = getattr(queued_item, "use_silent_gaps", False)
# Restore the original file path for save location
diff --git a/abogen/queue_manager_gui.py b/abogen/queue_manager_gui.py
index 0e2dbf3..78cfcec 100644
--- a/abogen/queue_manager_gui.py
+++ b/abogen/queue_manager_gui.py
@@ -302,7 +302,7 @@ class QueueManager(QDialog):
f"Subtitle Mode: {getattr(item, 'subtitle_mode', '')}
"
f"Output Format: {getattr(item, 'output_format', '')}
"
f"Characters: {getattr(item, 'total_char_count', '')}
"
- f"Replace Single Newlines: {getattr(item, 'replace_single_newlines', False)}
"
+ f"Replace Single Newlines: {getattr(item, 'replace_single_newlines', True)}
"
f"Use Silent Gaps: {getattr(item, 'use_silent_gaps', False)}
"
f"Speed Method: {getattr(item, 'subtitle_speed_method', 'tts')}"
)
@@ -415,7 +415,7 @@ class QueueManager(QDialog):
attrs["total_char_count"] = getattr(parent, "char_count", "")
# replace_single_newlines
attrs["replace_single_newlines"] = getattr(
- parent, "replace_single_newlines", False
+ parent, "replace_single_newlines", True
)
# use_silent_gaps
attrs["use_silent_gaps"] = getattr(parent, "use_silent_gaps", False)
@@ -501,8 +501,8 @@ class QueueManager(QDialog):
== getattr(item, "output_format", None)
and getattr(queued_item, "total_char_count", None)
== getattr(item, "total_char_count", None)
- and getattr(queued_item, "replace_single_newlines", False)
- == getattr(item, "replace_single_newlines", False)
+ and getattr(queued_item, "replace_single_newlines", True)
+ == getattr(item, "replace_single_newlines", True)
and getattr(queued_item, "use_silent_gaps", False)
== getattr(item, "use_silent_gaps", False)
and getattr(queued_item, "subtitle_speed_method", "tts")
diff --git a/abogen/queued_item.py b/abogen/queued_item.py
index fc6c067..38d4054 100644
--- a/abogen/queued_item.py
+++ b/abogen/queued_item.py
@@ -13,7 +13,7 @@ class QueuedItem:
subtitle_mode: str
output_format: str
total_char_count: int
- replace_single_newlines: bool = False
+ replace_single_newlines: bool = True
use_silent_gaps: bool = False
subtitle_speed_method: str = "tts"
save_base_path: str = None
diff --git a/abogen/utils.py b/abogen/utils.py
index f668654..ba6e30e 100644
--- a/abogen/utils.py
+++ b/abogen/utils.py
@@ -133,7 +133,7 @@ _sleep_procs = {"Darwin": None, "Linux": None} # Store sleep prevention process
def clean_text(text, *args, **kwargs):
# Load replace_single_newlines from config
cfg = load_config()
- replace_single_newlines = cfg.get("replace_single_newlines", False)
+ replace_single_newlines = cfg.get("replace_single_newlines", True)
# Collapse all whitespace (excluding newlines) into single spaces per line and trim edges
# Use pre-compiled pattern for better performance
lines = [_WHITESPACE_PATTERN.sub(" ", line).strip() for line in text.splitlines()]