Updates
Rolling release / release (push) Successful in 6m40s

This commit is contained in:
2026-09-12 07:22:47 -04:00
parent e4546f8e95
commit e9040d110a
30 changed files with 1688 additions and 444 deletions
+11 -8
View File
@@ -102,21 +102,24 @@ export class JarvisDaemon extends EventEmitter {
if (this.state === 'SPEAKING') this.setState('LISTENING');
}
_speakReply(spoken) {
if (!this.voiceLoop) {
this._finishSpeech();
return;
}
const play = async () => {
await this.ensureTts();
const playing = this.voiceLoop?.speak?.(spoken);
if (!playing) {
if (!this.voiceLoop?.status?.tts) {
const reason = this.voiceLoop?.status?.errors?.tts;
if (reason && reason !== 'Spoken replies are disabled') this.emit('Error', 'TTS', reason);
this._finishSpeech();
return;
}
await playing;
await this.voiceLoop.speak(spoken);
};
Promise.resolve(play()).catch((error) => {
this.emit('Error', 'TTS', error.message);
if (this.state === 'SPEAKING') this._finishSpeech();
});
Promise.resolve(play())
.catch((error) => {
this.emit('Error', 'TTS', error.message);
})
.finally(() => this._finishSpeech());
}
async ensureTts() {
if (!this.voiceLoop) return;