listen.rs is the listener's engine, built like the sentence helper: a content-named catalogue read and kept for offline use, files downloaded one at a time into the model store and SHA-256 checked, install / stop / continue / remove, a first-run check (every graph runs once on silence), a newer model kept only once it has run here, and other tabs followed. - Runtime: onnxruntime-web 1.30.0 (the latest stable), vendored by third_party/onnxruntime-web/vendor.sh with its MIT licence: only the JSPI and asyncify WebGPU bundles and their WebAssembly, unchanged and pinned; each browser downloads one (WebAssembly.Suspending). The worker imports the bundle from the model store and hands it the WebAssembly, so nothing is fetched by name; with JSPI it reads the weights one tensor at a time, holding one 64 MiB file at most. - Graphics chip only: fit() needs a hardware WebGPU adapter that is not refused and offers shader-f16 (now in the capability probe), and every session is created with session.disable_cpu_ep_fallback, which refuses a graph with any node on the processor (checked: a LogSoftmax graph is refused; the listener's graphs load). - Listening: one thing said per press. The VAD and silence rule are the prototype's (onset at 0.5, two windows of pre-roll, 500 ms below 0.35 ends it); words are passed on as they are heard; the person can stop it (what was heard is kept); 30 s with nobody speaking stops it. The microphone is opened only then and always let go at the end; while the app speaks (the device voice, or a downloaded one: neural_tts.js now says when it plays) and 300 ms after, it hears silence. 16 kHz capture in an AudioWorklet, resampled there where a browser will not. - Sharing the GPU with the sentence helper: the two never load at once (each waits for the other's load, and for the other's first-run check). Only a computer that says it has 8 GB or more keeps both loaded (3.1 GB together); every other device, and any that does not say (Safari, so every iPad), takes turns: Gemma lets go when listening starts, the listener before Gemma answers. prerender-static.sh vendors the runtime and ships asr/ after tools/asr/check_packs.py, or says AAC_ASR=none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
21 lines
1 KiB
Text
21 lines
1 KiB
Text
MIT License
|
|
|
|
Copyright (c) Microsoft Corporation
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|