mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 05:40:26 +02:00
Add number normalization and enhance UI for voice preview
- Implemented number conversion to words for grouped numbers in text normalization. - Added configuration options for number conversion in ApostropheConfig. - Updated the normalize_apostrophes function to include number normalization. - Enhanced the dashboard UI with new sections for manuscript and narrator defaults. - Improved voice preview functionality with better handling of audio playback and status updates. - Refactored HTML templates for cleaner structure and added new fields for speaker settings. - Updated CSS styles for improved layout and responsiveness. - Added tests to ensure correct spelling of grouped numbers in the normalization process. - Included num2words as a new dependency in pyproject.toml.
This commit is contained in:
@@ -63,3 +63,8 @@ def test_normalize_roman_titles_preserves_separators() -> None:
|
||||
assert normalized[0] == " 4. The Trial"
|
||||
assert normalized[1] == "5 - The Verdict"
|
||||
assert normalized[2].startswith("6\nAftermath")
|
||||
|
||||
|
||||
def test_grouped_numbers_are_spelled_out() -> None:
|
||||
normalized = _normalize_for_pipeline("The vault holds 35,000 credits")
|
||||
assert "thirty-five thousand" in normalized.lower()
|
||||
|
||||
Reference in New Issue
Block a user