opencode-interrupt-plugin 0.4.7 → 0.4.8

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/tts/index.js CHANGED
@@ -129,6 +129,8 @@ export class TTSStreamer extends EventEmitter {
129
129
  return this.engine.isPlaying || this.queue.length > 0 || this.processing || (Date.now() - this.lastActivity < 3000);
130
130
  }
131
131
  resetSession() {
132
+ this.stopped = false;
133
+ this.processing = false;
132
134
  this.buffer.clear();
133
135
  this.queue = [];
134
136
  this.spokenText = "";
@@ -136,9 +138,15 @@ export class TTSStreamer extends EventEmitter {
136
138
  }
137
139
  async processQueue() {
138
140
  this.processing = true;
141
+ debug(`[interrupt-tts] processQueue start, queue=${this.queue.length}, stopped=${this.stopped}`);
139
142
  while (this.queue.length > 0 && !this.stopped) {
140
143
  const sentence = this.queue.shift();
141
- await this.engine.speak(sentence);
144
+ try {
145
+ await this.engine.speak(sentence);
146
+ }
147
+ catch (err) {
148
+ debug(`[interrupt-tts] TTS error in processQueue: ${err}`);
149
+ }
142
150
  if (!this.stopped) {
143
151
  this.spokenText += sentence + " ";
144
152
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-interrupt-plugin",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "Streaming TTS + voice interruption for OpenCode. Speaks responses as they arrive and detects when you talk over it.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",