clavarium 0.2.222-next.1 → 0.2.223-next.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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.222-next.1",
3
+ "version": "0.2.223-next.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.2.222-next.1",
9
+ "version": "0.2.223-next.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.2.222-next.1",
3
+ "version": "0.2.223-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
package/server/boxes.mjs CHANGED
@@ -182,6 +182,9 @@ export const TEST_MIC = 'Test du micro. Parle-moi, je t\'écoute.';
182
182
  export const TEST_MIC_MS = 45_000;
183
183
  /* A LONG RECORDING (a meeting, a class): asked in words, stopped by the button or the wake word. */
184
184
  export const RECORD_ASKED = /\b(?:lance|d[ée]marre|commence|d[ée]bute)\w*\b.{0,25}\benregistrement\b|\benregistre\b.{0,20}\b(?:r[ée]union|conversation|cours|discussion|consultation)\b/i;
185
+ /* Off (01-11): a recording started without being asked, twice in a morning; back once it is asked for on
186
+ purpose (a button on the page). */
187
+ export const RECORD_BY_VOICE = false;
185
188
  export const RECORD_MAX_BYTES = 4 * 3600 * 32_000; /* four hours */
186
189
  export const mmss = (s) => `${String(Math.floor(s / 60)).padStart(2, '0')}:${String(Math.floor(s % 60)).padStart(2, '0')}`;
187
190
  /* THE MIXER of a box that plays a stream: words said meanwhile go over it, the stream lowered to DUCK while
@@ -739,7 +742,7 @@ export class Boxes {
739
742
  const box = link.box();
740
743
  /* Only a short order starts a recording ("lance l'enregistrement de la réunion"): a sentence that merely
741
744
  mentions recording does not (01-11). */
742
- if (RECORD_ASKED.test(text) && text.split(/\s+/).length <= 10 && this.#recordDir && this.#parts) {
745
+ if (RECORD_BY_VOICE && RECORD_ASKED.test(text) && text.split(/\s+/).length <= 10 && this.#recordDir && this.#parts) {
743
746
  this.#log(`voice box ${box.name}: a recording asked`);
744
747
  try { link.play(await this.#speak("J'enregistre. Pour arrêter, appuie sur le bouton ou dis le mot d'éveil.")); } catch { /* no voice: the light says it */ }
745
748
  link.send({ t: 'record', on: true });