From 696ce1ebd0c541208d2c22862d2df5139afcc0a2 Mon Sep 17 00:00:00 2001 From: Artem Akymenko Date: Wed, 29 Jul 2026 11:24:01 +0000 Subject: [PATCH] fix: use existing to_float32 from audio_helpers, keep INFO log level - synthesize.py: import to_float32 from domain.audio_helpers instead of duplicate - Revert all log levels back to INFO (user controls verbosity via --log-level) --- abogen/application/conversion_executor.py | 4 ++-- abogen/webui/routes/utils/synthesize.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/abogen/application/conversion_executor.py b/abogen/application/conversion_executor.py index 4e6eb90..1041dd0 100644 --- a/abogen/application/conversion_executor.py +++ b/abogen/application/conversion_executor.py @@ -301,7 +301,7 @@ def execute_conversion( chapter_display = f"Chapter {chapter_idx}/{len(plan.chapters)}: {chapter.title}" events.log(f"Processing {chapter_display}") - logging.info("[executor] Chapter %d/%d start: title=%s", chapter_idx, len(plan.chapters), chapter.title) + logging.info("[executor] Chapter %d/%d: %s", chapter_idx, len(plan.chapters), chapter.title) # Resolve chapter voice chapter_provider, chapter_voice, chapter_speed, chapter_steps = _resolve_voice( @@ -532,7 +532,7 @@ def execute_conversion( collector.on_chapter_end(stats.current_time) logging.info("[executor] Chapter %d/%d done: time=%.1fs", chapter_idx, len(plan.chapters), stats.current_time) - logging.info("[executor] All chapters processed, total time=%.1fs", stats.current_time) + logging.info("[executor] All chapters done: total=%.1fs", stats.current_time) # Process outro if plan.outro and plan.outro.enabled and merge_chapters: diff --git a/abogen/webui/routes/utils/synthesize.py b/abogen/webui/routes/utils/synthesize.py index e5eee08..8145a74 100644 --- a/abogen/webui/routes/utils/synthesize.py +++ b/abogen/webui/routes/utils/synthesize.py @@ -7,6 +7,7 @@ import soundfile as sf from flask import current_app, send_file from flask.typing import ResponseReturnValue +from abogen.domain.audio_helpers import to_float32 from abogen.domain.device import select_device as _select_device from abogen.domain.enums import Language from abogen.domain.split_pattern import get_split_pattern @@ -155,7 +156,7 @@ def generate_preview_audio( graphemes = getattr(segment, "graphemes", "").strip() if not graphemes: continue - audio = _to_float32(getattr(segment, "audio", None)) + audio = to_float32(getattr(segment, "audio", None)) if audio.size == 0: continue remaining = max_samples - accumulated