Plain web, using the browser's own Web Speech API
- Instead of
- Unity WebGL
- Because
- Recognition is already in the browser: free, no keys, no audio upload, latency in the hundreds of milliseconds. A WebGL build would reach the same API through a JS bridge and charge a multi-megabyte download for the privilege.
- Costs me
- Web Speech support differs across browsers, so the client carries its own recovery path for recognition dying in the middle of a round.
One runtime dependency: ws
- Instead of
- A framework, an ORM, a test runner
- Because
- Node already ships an HTTP server, a SQLite driver and a test runner. Every dependency I decline is one I never have to patch at midnight on a box I maintain alone.
- Costs me
- Routing, sessions and schema handling are mine to write, and they are plainer than the libraries I skipped.
One answer parser, imported by both the client and the server
- Instead of
- Comparing recognised text against the expected string
- Because
- Speech gives you "twenty one", "21" and "twenty-one" for one answer. If the rule for what counts as correct exists twice, players eventually watch the judge disagree with itself - and that ends the game more effectively than any bug.
- Costs me
- That file can never diverge, so it lives in shared/ and is the most heavily tested thing in the project.