Documentation Index
Fetch the complete documentation index at: https://mintlify.com/senstella/parakeet-mlx/llms.txt
Use this file to discover all available pages before exploring further.
SentenceConfig is a dataclass that controls how transcribed text is split into sentences based on punctuation, silence gaps, word count, or duration.
Class Definition
Fields
Maximum number of words allowed in a single sentence. When the next token would exceed this limit, a sentence break is created.Set to
None to disable word-based splitting.Example: max_words=30Minimum silence duration (in seconds) that triggers a sentence split. When the gap between tokens exceeds this threshold, a new sentence is created.Set to
None to disable silence-based splitting.Example: silence_gap=5.0Maximum duration (in seconds) allowed for a single sentence. When a sentence reaches this duration, it is split even if no other conditions are met.Set to
None to disable duration-based splitting.Example: max_duration=40.0Splitting Behavior
Sentences are automatically split at punctuation marks (., !, ?, 。, ?, !). Additional splits occur when any of the following conditions are met:
- Punctuation: Token contains sentence-ending punctuation
- Word limit: Next token would exceed
max_words(if set) - Silence gap: Gap between current and next token exceeds
silence_gap(if set) - Duration limit: Sentence duration exceeds
max_duration(if set)
Examples
Default Configuration
By default, sentences are only split at punctuation:Limit Words per Sentence
Split long sentences to keep them under 30 words:Split on Long Silences
Create sentence breaks when silence exceeds 5 seconds:Limit Sentence Duration
Keep sentences under 40 seconds:Combine Multiple Constraints
Use all splitting criteria together:Use Cases
Subtitle Generation
For video subtitles, limit words and duration to fit on screen:Meeting Transcription
For meeting notes, split on natural pauses:Podcast Transcription
For long-form content with natural flow:Related
- DecodingConfig - Parent configuration class
- AlignedSentence - Sentence objects created by this config
- Sentence Splitting Guide - Learn more about sentence splitting strategies