@speakableio/core 1.0.45 → 1.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2180,24 +2180,34 @@ var createSetRepo = () => {
2180
2180
  // src/utils/ai/detect-transcript-hallucionation.ts
2181
2181
  var HALLUCINATION_THRESHOLDS = {
2182
2182
  // Short repeats
2183
- MIN_CONSECUTIVE_REPEATS: 3,
2184
- MIN_WORDS_FOR_RATIO_CHECK: 10,
2183
+ MIN_CONSECUTIVE_REPEATS: 5,
2184
+ // Increased from 3 to allow phrases like "pio pio pio" or "no no no no"
2185
+ MIN_WORDS_FOR_RATIO_CHECK: 15,
2186
+ // Increased from 10 to require longer text for ratio check
2185
2187
  MAX_UNIQUE_WORDS_FOR_RATIO: 3,
2186
- MIN_REPETITION_RATIO: 3,
2188
+ MIN_REPETITION_RATIO: 4,
2189
+ // Increased from 3 to be more permissive
2187
2190
  // Phrase repeats
2188
- MIN_SENTENCE_LENGTH: 10,
2189
- MIN_CONSECUTIVE_SIMILAR_SENTENCES: 2,
2190
- MIN_SENTENCES_FOR_DUPLICATE_CHECK: 3,
2191
+ MIN_SENTENCE_LENGTH: 15,
2192
+ // Increased from 10 to avoid flagging short natural sentences
2193
+ MIN_CONSECUTIVE_SIMILAR_SENTENCES: 3,
2194
+ // Increased from 2 to allow some natural repetition
2195
+ MIN_SENTENCES_FOR_DUPLICATE_CHECK: 4,
2196
+ // Increased from 3
2191
2197
  // Cyclic patterns
2192
- MIN_CYCLE_LENGTH: 20,
2198
+ MIN_CYCLE_LENGTH: 30,
2199
+ // Increased from 20 to focus on longer patterns
2193
2200
  MIN_CYCLE_REPEATS: 3,
2194
2201
  // Entropy detection
2195
- MIN_LENGTH_FOR_ENTROPY_CHECK: 50,
2196
- MAX_ENTROPY_THRESHOLD: 2.5,
2197
- // bits per character
2202
+ MIN_LENGTH_FOR_ENTROPY_CHECK: 60,
2203
+ // Increased from 50
2204
+ MAX_ENTROPY_THRESHOLD: 2.2,
2205
+ // Decreased from 2.5 to be more strict on entropy (lower = more repetitive needed)
2198
2206
  // Similarity
2199
- SENTENCE_SIMILARITY_THRESHOLD: 0.8,
2200
- SEGMENT_SIMILARITY_THRESHOLD: 0.85
2207
+ SENTENCE_SIMILARITY_THRESHOLD: 0.85,
2208
+ // Increased from 0.8 to require more similarity
2209
+ SEGMENT_SIMILARITY_THRESHOLD: 0.9
2210
+ // Increased from 0.85
2201
2211
  };
2202
2212
  function detectTranscriptHallucinationWithDetails(transcript) {
2203
2213
  if (!transcript || transcript.trim().length === 0) {