The kitchen can actually hear it: a voice, real pauses, and no gesture - #842
Merged
Merged
Conversation
Three things the owner asked about, and one he did not, which was the one that would have kept the speaker silent. A PAUSE BETWEEN DISHES. Owner: "little pause between line items." The announcement was one sentence with full stops in it. A full stop is a shorter gap than a kitchen needs, so it is now one utterance per line and the engine leaves a real gap between them - long enough to hold one dish in your head before the next arrives. INDIAN ENGLISH. Owner: "its indian english. not so fluent." An American voice reads biryani, paneer and kuzhambu like somebody who has never ordered one. Windows ships en-IN voices, Heera and Ravi, so one is preferred where the machine has it, then en-GB, then any English. Chosen once and remembered: getVoices() fills in asynchronously, and asking per ticket is how the first announcement of a service comes out in the wrong accent. It also listens for onvoiceschanged, because asking at load usually returns an empty list. AND THE ONE THAT MATTERED MOST. Chromium refuses to play audio until somebody has interacted with the page. On a counter till that is invisible - it is clicked all day. On the machine at the pass it is the whole problem: it sits untouched for hours, which is exactly when a ticket needs announcing, and the chime would have been refused with nothing in any log to say why. The switch is set before the app is ready, because afterwards it is ignored. I also claimed the script only loaded on one page of ten and "fixed" it. That was wrong: `dashboard` is not a screen, it is the shell the fifty seven modules run inside. The change was reverted rather than left in as churn. Twenty one tests. They still do not cover the speaker or the voice: that needs the kitchen machine, a Bluetooth speaker and one real ticket.
Owner: "KOT total items also print and voice read please. so that chef's
can hear well."
------------------------------------------------
TOTAL ITEMS 4
and, before the list rather than after it:
Table 5, new order.
Three items.
One Chicken Biryani.
Two Butter Naan.
BEFORE, because a number heard first is one you can count against. A chef
told three plates are coming notices when they have heard two. After the
list it is a fact nobody can act on.
PLATES, NOT LINES. One biryani and two naan is three things to cook and
two lines on the ticket. A kitchen works in plates, and the printed total
and the spoken one count it the same way on purpose - a cook checking the
paper against what they heard must not find two different numbers.
The count is the whole ticket even when the announcement is cut to six
lines and summarised. That is precisely when it earns its place.
Four older tests changed expectations rather than failed: they asserted
the exact sentence, and the sentence now carries the count. The other 64
tests around the ticket renderer pass unchanged.
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #837, prompted by two questions from the owner - and one of the three fixes here is the one that would otherwise have kept the speaker silent.
"little pause between line items"
The announcement was one sentence with full stops in it. A full stop is a shorter gap than a kitchen needs, so it is now one utterance per line:
A speech engine leaves a real gap between utterances - long enough to hold one dish in your head before the next arrives.
"its indian english. not so fluent"
An American voice reads biryani, paneer and kuzhambu like somebody who has never ordered one. Windows ships en-IN voices (Heera, Ravi), so one is preferred where the machine has it, then en-GB, then any English.
Chosen once and remembered:
getVoices()fills in asynchronously, and asking per ticket is how the first announcement of a service comes out in the wrong accent. It also listens foronvoiceschanged, because asking at load usually returns an empty list.The one nobody asked about, and the one most likely to have broken it
Chromium refuses to play audio until somebody has interacted with the page.
On a counter till that is invisible - it is clicked all day. On the machine at the pass it is the whole problem: it sits untouched for hours, which is exactly when a ticket needs announcing, and the chime would have been refused with nothing in any log to say why.
Set before the app is ready, because afterwards it is ignored.
A correction
I also claimed the script only loaded on one page of ten and "fixed" that. It was not a defect:
dashboardis not a screen, it is the shell the 57 modules run inside, so it was already loading everywhere that matters. The change was reverted rather than left in as churn.Tests
21 pass, including two new ones on the line-at-a-time behaviour.
They still do not cover the speaker or the voice. That needs the kitchen machine, the Bluetooth speaker and one real ticket - and until that happens nobody should assume this works.