From 9c9df6d65b137192bf5ba725540a81bbd3aacee8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 1 Oct 2024 08:56:50 +0530 Subject: [PATCH] ... --- src/calibre/spell/break_iterator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/spell/break_iterator.py b/src/calibre/spell/break_iterator.py index d73c151d3b..cba9b3cf8c 100644 --- a/src/calibre/spell/break_iterator.py +++ b/src/calibre/spell/break_iterator.py @@ -105,7 +105,7 @@ def split_into_sentences_for_tts( pending_start, pending_sentence = 0, '' for start, length in sentence_positions(text, lang): end = start + length - sentence = text[start:start+length].rstrip().replace('\n', ' ').strip() + sentence = text[start:end].rstrip().replace('\n', ' ').strip() if not sentence: continue if len(sentence) < min_sentence_length and text[end-1] != PARAGRAPH_SEPARATOR: