diff options
| author | historia <historiavg@proton.me> | 2026-08-20 23:50:37 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-20 23:50:37 -0400 |
| commit | 38c8fdcba7ce54ad0ad76be9ef0748df1c55ebc1 (patch) | |
| tree | 911e031ee0e4b902fcd3954df3838a920416e8a3 /converter/audio.py | |
| parent | 5c3df0a434059bd0d541bda35a51e49e3c44dd55 (diff) | |
| download | tts-audiobook-generator-38c8fdcba7ce54ad0ad76be9ef0748df1c55ebc1.tar.gz | |
feat: make_audiocpp_server_json.py takes an argument. remove chunk wording with audiocpp backend.
Diffstat (limited to 'converter/audio.py')
| -rw-r--r-- | converter/audio.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/converter/audio.py b/converter/audio.py index 01f78ab..d1dc28b 100644 --- a/converter/audio.py +++ b/converter/audio.py @@ -425,11 +425,19 @@ def combine_chunks(total_chunks: int, output_path: Path, if intermediate: logger.info("Chapter audio saved (intermediate): %s (%d/%d chunks)", output_path, len(chunk_files), total_chunks) - print(f"[INFO] Saved chapter audio (intermediate): {output_path.name} " - f"({len(chunk_files)}/{total_chunks} chunks)") + if len(chunk_files) == 1 and total_chunks == 1: + print(f"[INFO] Saved chapter audio (intermediate): " + f"{output_path.name}") + else: + print(f"[INFO] Saved chapter audio (intermediate): {output_path.name} " + f"({len(chunk_files)}/{total_chunks} chunks)") else: logger.info("Audiobook saved: %s (%d/%d chunks)", output_path, len(chunk_files), total_chunks) - print(f"[INFO] Saved audiobook: {output_path.name} ({len(chunk_files)}/{total_chunks} chunks)") + if len(chunk_files) == 1 and total_chunks == 1: + print(f"[INFO] Saved audiobook: {output_path.name}") + else: + print(f"[INFO] Saved audiobook: {output_path.name} " + f"({len(chunk_files)}/{total_chunks} chunks)") if speed_path is not None: logger.info("Saved speed-adjusted audiobook (%gx): %s", speed, speed_path) |
