add TRANSCRIBE_TARGET_LENGTH setting

This commit is contained in:
j 2025-01-25 11:43:27 +05:30
parent d2da5ae581
commit f28d37e33e

View file

@ -21,6 +21,7 @@ from user.models import User
logger = logging.getLogger(__name__)
TARGET_LENGTH = getattr(settings, 'TRANSCRIBE_TARGET_LENGTH', 200)
def prepare_annotations(result, join_sentences=False):
if join_sentences:
@ -37,7 +38,7 @@ def prepare_annotations(result, join_sentences=False):
return annotations
def prepare_joint_annotations(result, target_length=200):
def prepare_joint_annotations(result, target_length=TARGET_LENGTH):
abbrevs = ["Mr.", "Mrs.", "Dr."]
ignore = []
phrase_sounds = []