* fix(gather): clear a finalized deepgram interim word so UtteranceEnd is not deferred forever
The #1088 check defers UtteranceEnd while an interim word newer than
last_word_end is pending. The marker was only cleared by a non-empty
is_final, so an interim word that Deepgram later dropped (e.g. line
noise, followed by an empty final) left it set: the gather waited for
the caller to speak again and merged both utterances.
Clear the marker on any Deepgram is_final result whose window
(start + duration) covers it. A word that Deepgram carries into the
next segment still defers UtteranceEnd.
Port of jambonz/feature-server#223.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(gather): return the buffer when a deferred deepgram UtteranceEnd is satisfied
Clearing the unprocessed-word marker only helps if the covering final
arrives before UtteranceEnd. If it arrives after, UtteranceEnd has
already been deferred and Deepgram sends no further UtteranceEnd until
new speech, so the next utterance is still merged in.
Remember a deferred UtteranceEnd, and when a later final clears the
marker, return the buffered transcript once that final has been
handled (setImmediate, since _onTranscription has early returns).
Port of jambonz/feature-server#225.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(gather): only an empty final ends a gather early after a deferred UtteranceEnd
A final with words means the caller resumed talking after the pause;
Deepgram will send a new UtteranceEnd after those words, so keep the
existing flow instead of cutting the caller off mid-sentence (or
skipping the asrTimeout wait). Only a final that drops the pending word
(empty) leaves nothing else to end the gather.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix race condition where gather resolves with speech transcript but timeout timer gets set after the resolve and is left running after gather completes
* remove unneeded line of code
* fixed gather does not start timeout on bargin
* with previous change, no need to emit playDone since no where in the code are we listening for it
---------
Co-authored-by: Dave Horton <daveh@beachdognet.com>
* fixed transcription is not received when call is terminated
* wip
* fixed failing testcases
* wip
* wip
* wip
* wip
* should not do gracefulshutdown on stopAmd
* better handling of flush commands
* rework buffering of tokens
* gather: when returning low confidence also provide the transcript
* better error handling in tts:tokens
* special handling of asr timeout for speechmatics
* remove some logs that were excessively wordy
* add speechmatics options
* wip
* speechmatics does not do endpointing for us so we need to flip on continuousAsr
* speechmatics: continousAsr should be at least equal to max_delay, if set
* wip
* add TtsStreamingBuffer class to abstract handling of streaming tokens
* wip
* add throttling support
* support background ttsStream (#995)
* wip
* add TtsStreamingBuffer class to abstract handling of streaming tokens
* wip
* support background ttsStream
* wip
---------
Co-authored-by: Dave Horton <daveh@beachdognet.com>
* wip
* dont send if we have nothing to send
* initial testing with cartesia
* wip
---------
Co-authored-by: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com>
* feat/975: fixed continuous asr not stopping when asrDtmfTerminationDigit is configured
* feat/975: giving first preference to asrDtmfTerminationDigit if there is already ASR happened
* fix transcribe fixes for speechmatics
* update to verb-specs with fixes for speechmatics
* add support for speechmatics translation
* add handlers for receiving translations
* call translation hookd
* gather: no need to restart speechmatics after a final transcript during continuous asr
* graceful shutdown
* wip
* wip
* wip
* wip
* wip
* add support for aws language model name when transcribing
* wip - from prev branch
* wip
* support both aws grpc and ws api - detect based on transcription payload
* update to drachtio-fsmrf@4.0.0
* fix for grpc compatibility, requires JAMBONES_AWS_TRANSCRIBE_USE_GRPC env
* back out major update to drachtio-srf and fsmrf; that should come in a separate PR
* update drachtio-srf
* allow move to next task if say verb is failed because of speech credential
* allow move to next task if say verb is failed because of speech credential
* allow move to next task if say verb is failed because of speech credential
* wip
* wip
* clear gather timeout if imterim result received
* fix to reset timeout timer if receive interrim result
* fix to reset timeout timer if receive interrim result
* feat/813 - notify speech-bargein-detected and dtmf-bargein-detected events
* fix for #826 race condition in say (#827)
* fix for #826 race condition in say
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* wip
* Update transcription-utils.js (#802)
* Check the confidence levels of a transcript with minConfidence (#808)
* https://github.com/jambonz/jambonz-feature-server/issues/807
* feat/807: Using minConfidence from recognizer settings
* feat/807: new reason stt-min-confidence-error
* feat/807: sending stt-min-confidence instead of stt-min-confidence-error
* feat/807: sending stt-low-confidence instead of stt-min-confidence-error
* feat/807 - removed ? for this.data
* fix conference end is not sent when moderator leave conference (#825)
* fix conference end is not sent when moderator leave conference
* wip
* fix review comment
* feat/813: checking for playComplete before sending dtmf-bargein-detected event
* feat/813: added this.playComplete=true at the end of _killAudio method
* feat/813: removed empty line
* feat/813: removed nested if and added condition to main if
* feat/813: notifyStatus called when not playComplete
* feat/813: referring to time-series 0.2.9 version
* feat/813: generated package-lock.json
---------
Co-authored-by: Dave Horton <daveh@beachdognet.com>
Co-authored-by: Vinod Dharashive <vdharashive@gmail.com>
Co-authored-by: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com>