clavarium 0.2.142-beta.1 → 0.2.143-beta.1
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/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/server/boxes.mjs +9 -0
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.143-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "clavarium",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.143-beta.1",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|
package/package.json
CHANGED
package/server/boxes.mjs
CHANGED
|
@@ -678,6 +678,15 @@ export class Boxes {
|
|
|
678
678
|
if (m.t === 'listen.end' && sentence) {
|
|
679
679
|
const pcm = Buffer.concat(sentence);
|
|
680
680
|
sentence = null;
|
|
681
|
+
/* RADIO OR TV IN A CONVERSATION (03-11): a "sentence" that never stopped (cut by its length) is not
|
|
682
|
+
talk to it -- asked once « Tu me parles ? »; a second one ends the conversation. Nothing sent. */
|
|
683
|
+
if (link.chat && m.reason === 'timeout') {
|
|
684
|
+
if (link.chatDoubt) { link.chat = false; link.chatDoubt = false; link.recent = []; link.send({ t: 'chat', on: false }); this.#log(`voice box ${box.name}: conversation ended, the room talks`); link.send({ t: 'cue', name: 'done' }); return; }
|
|
685
|
+
link.chatDoubt = true;
|
|
686
|
+
void (async () => { try { link.play(await this.#speak('Tu me parles ?'), 'listen'); } catch { link.send({ t: 'cue', name: 'done' }); } })();
|
|
687
|
+
return;
|
|
688
|
+
}
|
|
689
|
+
link.chatDoubt = false;
|
|
681
690
|
void this.#heard(link, pcm);
|
|
682
691
|
return;
|
|
683
692
|
}
|