Task 19: Update TTS generation endpoint to accept edited scripts

- Modified TTSRequest to accept optional segments array
- Updated generate_audiobook endpoint to use segments if provided
- Added generate_audiobook_from_segments method to TTSService
- Ensured backward compatibility with text-based generation
- Added comprehensive tests for segment-based generation
- All tests passing (7/7)

Requirements: 15.7
This commit is contained in:
2025-12-09 11:46:10 +00:00
parent e2196c592a
commit cea97d3cd4
4 changed files with 263 additions and 12 deletions

View File

@@ -372,7 +372,7 @@
- Test error handling
- _Requirements: 15.2_
- [ ] 19. Update TTS generation endpoint to accept edited scripts
- [x] 19. Update TTS generation endpoint to accept edited scripts
- Modify TTSRequest to accept optional segments array
- Update generate_audiobook logic to use segments if provided
- Fall back to text segmentation if no segments provided