mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-07-04 19:32:01 +00:00
wip
This commit is contained in:
+10
-2
@@ -1113,13 +1113,21 @@ class TaskGather extends SttTask {
|
||||
if (!this.asrTimeout) this._sendHoundifyDone(this.ep);
|
||||
else this._startAsrTimer();
|
||||
} else if (transcript) {
|
||||
/* mode segmentation OFF: FS module filters partials by eoq/vad threshold,
|
||||
* so any partial arriving here is an end-of-turn signal. */
|
||||
this._houndifyLastPartial = evt;
|
||||
const segMode = this.data.recognizer?.houndifyOptions?.requestInfo?.segmentation?.mode !== 'none';
|
||||
if (!segMode) {
|
||||
/* FS forwards two kinds of partials in mode OFF —
|
||||
* end-of-turn (eoq >= threshold) → trigger Done / arm timer
|
||||
* user-speaking (eoq < threshold) → reset asrTimer only */
|
||||
const eoqThreshold = this.data.recognizer?.houndifyOptions?.eoqThreshold ?? 0.5;
|
||||
const eoq = evt.vendor?.evt?.eoq;
|
||||
const isEndOfTurn = typeof eoq === 'number' && eoq >= eoqThreshold;
|
||||
if (isEndOfTurn) {
|
||||
if (!this.asrTimeout) this._sendHoundifyDone(this.ep);
|
||||
else this._startAsrTimer();
|
||||
} else if (this.asrTimeout && this._asrTimer) {
|
||||
this._startAsrTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!transcript) emptyTranscript = true;
|
||||
|
||||
+10
-2
@@ -652,15 +652,23 @@ class TaskTranscribe extends SttTask {
|
||||
if (!this.asrTimeout) this._sendHoundifyDone(channel === 2 ? this.ep2 : this.ep, channel);
|
||||
else this._startAsrTimer(channel);
|
||||
} else if (transcript) {
|
||||
/* mode segmentation OFF: FS module filters partials by eoq/vad threshold,
|
||||
* so any partial arriving here is an end-of-turn signal. */
|
||||
this._houndifyLastPartial = this._houndifyLastPartial || [null, null];
|
||||
this._houndifyLastPartial[channel - 1] = evt;
|
||||
const segMode = this.data.recognizer?.houndifyOptions?.requestInfo?.segmentation?.mode !== 'none';
|
||||
if (!segMode) {
|
||||
/* FS forwards two kinds of partials in mode OFF —
|
||||
* end-of-turn (eoq >= threshold) → trigger Done / arm timer
|
||||
* user-speaking (eoq < threshold) → reset asrTimer only */
|
||||
const eoqThreshold = this.data.recognizer?.houndifyOptions?.eoqThreshold ?? 0.5;
|
||||
const eoq = evt.vendor?.evt?.eoq;
|
||||
const isEndOfTurn = typeof eoq === 'number' && eoq >= eoqThreshold;
|
||||
const ep = channel === 2 ? this.ep2 : this.ep;
|
||||
if (isEndOfTurn) {
|
||||
if (!this.asrTimeout) this._sendHoundifyDone(ep, channel);
|
||||
else this._startAsrTimer(channel);
|
||||
} else if (this.asrTimeout && this._asrTimers?.[channel - 1]) {
|
||||
this._startAsrTimer(channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user