diff options
| author | historia <historiavg@proton.me> | 2026-08-19 02:10:13 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-19 02:10:13 -0400 |
| commit | 11384921323f7b08271be0607d8df774489a1f7d (patch) | |
| tree | 90b78855cce256dea077ed72dd822ae1fbb1696f /tests/test_chunking.py | |
| parent | a89daa1af05e2816f970d6a7b28a07df4f102f7d (diff) | |
| download | tts-audiobook-generator-11384921323f7b08271be0607d8df774489a1f7d.tar.gz | |
fix: reduce chunk size to 40
Diffstat (limited to 'tests/test_chunking.py')
| -rw-r--r-- | tests/test_chunking.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_chunking.py b/tests/test_chunking.py index 659a771..d1d95bd 100644 --- a/tests/test_chunking.py +++ b/tests/test_chunking.py @@ -2,9 +2,19 @@ import unittest +from converter import config from converter.chunking import split_into_chunks +class ChunkSizeDefaultTests(unittest.TestCase): + """Guard the default chunk size: each API call is one model generation, + and long single generations lose prosody, can turn garbled, and are + truncated at the model's token limit (text past it is never spoken).""" + + def test_default_chunk_size_within_single_generation_budget(self): + self.assertLessEqual(config.CHUNK_SIZE_WORDS, 60) + + class SplitIntoChunksTests(unittest.TestCase): def test_empty_input(self): self.assertEqual(split_into_chunks(""), []) |
