From 11384921323f7b08271be0607d8df774489a1f7d Mon Sep 17 00:00:00 2001 From: historia Date: Wed, 19 Aug 2026 02:10:13 -0400 Subject: fix: reduce chunk size to 40 --- tests/test_chunking.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/test_chunking.py') 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(""), []) -- cgit v1.2.3