Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rapidaai/react",
"version": "1.1.53",
"version": "1.1.54",
"description": "An easy to use react client for building generative ai application using Rapida platform.",
"repository": {
"type": "git",
Expand Down
3 changes: 3 additions & 0 deletions src/agents/voice-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ export class VoiceAgent extends Agent {
private fadeOutAudio = (duration: number = 2) => {
if (!this.output) return;

// Reset interrupt flag to prevent VAD from clearing audio due to previous WORD interrupt
this.output.worklet.port.postMessage({ type: "resetInterrupt" });

const currentTime = this.output.context.currentTime;
this.output.gain.gain.exponentialRampToValueAtTime(
0.0001,
Expand Down
3 changes: 3 additions & 0 deletions src/audio/audio-concat-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class AudioConcatProcessor extends AudioWorkletProcessor {
case "interrupt":
this.wasInterrupted = true;
break;
case "resetInterrupt":
this.wasInterrupted = false;
break;
case "clearInterrupted":
if (this.wasInterrupted) {
this.wasInterrupted = false;
Expand Down