feat: Implement speaker analysis and EPUB 3 export functionality

- Added speaker analysis module to infer speaker identities from text chunks.
- Introduced SpeakerGuess and SpeakerAnalysis data classes for managing speaker data.
- Developed functions for analyzing speaker occurrences and confidence levels.
- Created EPUB 3 exporter to generate EPUB packages with synchronized narration and media overlays.
- Implemented configurable chunking options for TTS synthesis and EPUB alignment.
- Enhanced JavaScript for speaker preview functionality in the web interface.
- Added comprehensive tests for chunking and EPUB exporting features.
- Documented upgrade plan for transitioning to EPUB 3 with multi-speaker support.
This commit is contained in:
JB
2025-10-07 17:57:53 -07:00
parent bacf1b2f9e
commit 41f56a8491
18 changed files with 2844 additions and 14 deletions
+5 -1
View File
@@ -54,4 +54,8 @@ def test_service_processes_job(tmp_path):
assert runner_invocations, "conversion runner was never called"
assert job.status is JobStatus.COMPLETED
assert job.progress == 1.0
assert job.result.audio_path == outputs / f"{job.id}.wav"
assert job.result.audio_path == outputs / f"{job.id}.wav"
assert job.chunk_level == "paragraph"
assert job.speaker_mode == "single"
assert job.chunks == []
assert not job.generate_epub3