improvement: voice sequences now play based on audio lengt
As opposed to set time. This will help account for discrepancies between audio cue lengths in different languages
This commit is contained in:
parent
0d77ea7f84
commit
e18e1b3c91
1 changed files with 36 additions and 28 deletions
|
@ -29,26 +29,33 @@ export const initializationSequence = async () => {
|
||||||
Notifications.info("Jankboard initialized!", {
|
Notifications.info("Jankboard initialized!", {
|
||||||
withAudio: true,
|
withAudio: true,
|
||||||
src: getVoicePath("jankboard-initialized"),
|
src: getVoicePath("jankboard-initialized"),
|
||||||
});
|
onComplete: () => {
|
||||||
setTimeout(() => {
|
if (get(settingsStore).goWoke) {
|
||||||
if (get(settingsStore).goWoke) return;
|
sequenceStore.update("initializationComplete", true);
|
||||||
Notifications.success("LittenOS is online", {
|
periodicSequence();
|
||||||
withAudio: true,
|
return;
|
||||||
src: getVoicePath("littenos-is-online"),
|
}
|
||||||
});
|
Notifications.success("LittenOS is online", {
|
||||||
setTimeout(() => {
|
|
||||||
Notifications.warn("Breaching Monte Vista codebase", {
|
|
||||||
withAudio: true,
|
withAudio: true,
|
||||||
src: getVoicePath("breaching-monte-vista"),
|
src: getVoicePath("littenos-is-online"),
|
||||||
|
onComplete: () => {
|
||||||
|
Notifications.warn("Breaching Monte Vista codebase", {
|
||||||
|
withAudio: true,
|
||||||
|
src: getVoicePath("breaching-monte-vista"),
|
||||||
|
onComplete: () => {
|
||||||
|
Notifications.playAudio(
|
||||||
|
getVoicePath("hello-virtual-assistant"),
|
||||||
|
() => {
|
||||||
|
sequenceStore.update("initializationComplete", true);
|
||||||
|
periodicSequence();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
},
|
||||||
Notifications.playAudio(getVoicePath("hello-virtual-assistant"), () => {
|
});
|
||||||
sequenceStore.update("initializationComplete", true);
|
|
||||||
periodicSequence();
|
|
||||||
});
|
|
||||||
}, 3000);
|
|
||||||
}, 3000);
|
|
||||||
}, 3000);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let counter = 1;
|
let counter = 1;
|
||||||
|
@ -185,8 +192,9 @@ export const infotainmentBootupSequence = async () => {
|
||||||
get(sequenceStore).infotainmentStartedFirstTime ||
|
get(sequenceStore).infotainmentStartedFirstTime ||
|
||||||
get(settingsStore).disableAnnoyances ||
|
get(settingsStore).disableAnnoyances ||
|
||||||
infotainmentStarted
|
infotainmentStarted
|
||||||
)
|
) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
infotainmentStarted = true;
|
infotainmentStarted = true;
|
||||||
await tick();
|
await tick();
|
||||||
|
@ -195,16 +203,16 @@ export const infotainmentBootupSequence = async () => {
|
||||||
Notifications.info("Infotainment system buffering", {
|
Notifications.info("Infotainment system buffering", {
|
||||||
withAudio: true,
|
withAudio: true,
|
||||||
src: getVoicePath("infotainment-system-buffering"),
|
src: getVoicePath("infotainment-system-buffering"),
|
||||||
|
onComplete: () => {
|
||||||
|
Notifications.success("Infotainment system online", {
|
||||||
|
withAudio: true,
|
||||||
|
src: getVoicePath("infotainment-system-online"),
|
||||||
|
onComplete: () => {
|
||||||
|
sequenceStore.update("infotainmentStartedFirstTime", true);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
|
||||||
Notifications.success("Infotainment system online", {
|
|
||||||
withAudio: true,
|
|
||||||
src: getVoicePath("infotainment-system-online"),
|
|
||||||
onComplete: () => {
|
|
||||||
sequenceStore.update("infotainmentStartedFirstTime", true);
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}, 3000);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!get(sequenceStore).initializationComplete) {
|
if (!get(sequenceStore).initializationComplete) {
|
||||||
|
|
Loading…
Reference in a new issue