@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.
- package/dist/index.native.d.mts +33 -0
- package/dist/index.native.d.ts +33 -0
- package/dist/index.native.js +22 -12
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +22 -12
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +33 -0
- package/dist/index.web.js +22 -12
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.mjs
CHANGED
|
@@ -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:
|
|
2184
|
-
|
|
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:
|
|
2188
|
+
MIN_REPETITION_RATIO: 4,
|
|
2189
|
+
// Increased from 3 to be more permissive
|
|
2187
2190
|
// Phrase repeats
|
|
2188
|
-
MIN_SENTENCE_LENGTH:
|
|
2189
|
-
|
|
2190
|
-
|
|
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:
|
|
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:
|
|
2196
|
-
|
|
2197
|
-
|
|
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.
|
|
2200
|
-
|
|
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) {
|