Skip to content

Commit 7555c46

Browse files
committed
fix tests
1 parent 8eb4964 commit 7555c46

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

Sources/FluidAudio/ASR/Streaming/StabilizedStreamingEmitter.swift

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,13 @@ final class StabilizedStreamingEmitter {
8686
if extendsCommittedPrefix {
8787
let appendedCount = max(0, tokenIds.count - commitCount)
8888
if appendedCount > 0 {
89-
let canQuickCommit =
90-
timeSincePreviousUpdate >= config.quickCommitThresholdMs || repeatedHypothesis
89+
let canQuickCommit: Bool
90+
if config.emitWordBoundaries {
91+
canQuickCommit = repeatedHypothesis
92+
} else {
93+
canQuickCommit =
94+
timeSincePreviousUpdate >= config.quickCommitThresholdMs || repeatedHypothesis
95+
}
9196
if canQuickCommit {
9297
let candidatePrefix = Array(tokenIds.prefix(commitCount + appendedCount))
9398
let quickCommitCount = determineCommitCount(

0 commit comments

Comments
 (0)