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)
This commit is contained in:
Artem Akymenko
2026-07-29 11:24:01 +00:00
parent d3ded8af0e
commit 696ce1ebd0
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -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:
+2 -1
View File
@@ -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