license: apache-2.0 language: - en library_name: onnx pipeline_tag: text-classification base_model: sentence-transformers/all-MiniLM-L6-v2 datasets: - AmazonScience/massive tags: - onnx - int8 - on-device - intent-classification - voice-assistant

MayaID voice gate M1 (0.4.0)

A small on-device classifier that decides what a spoken sentence is for: words to type, a phone command (open an app, play, pause, skip, mute, volume…), a request for the person's assistant, or nothing. It runs on the phone, in the MayaID app's voice process, after speech has been turned into text on the phone. Nothing it reads leaves the device.

File voice-gate-m1-0.4.0.onnx
SHA-256 7521d0bd8bff4c490071ef44dee48f44640c6674bde02ae58ec8a2d753379efa
Size 23,150,101 bytes
Format ONNX, int8 dynamic quantisation (per channel); run with ONNX Runtime 1.20
Base sentence-transformers/all-MiniLM-L6-v2 (Apache-2.0), fine-tuned
Language English only

Check the SHA-256 before you use the file. The app refuses any file that does not match.

Inputs and outputs

  • Inputs: input_ids, attention_mask, token_type_ids, each int64[1,40]. The text is a sentence pair: segment A describes the phone's state (<context> keyboard <shown|hidden|unknown> media <playing|paused|quiet> <muted|unmuted>, where context is composer, field or none); segment B is the transcript. Both are lowercased, accent-stripped, reduced to a-z 0-9 ', and tokenised with BERT WordPiece (uncased, the base model's vocabulary).
  • Output: logits, float32[1,14]. Probabilities are softmax(logits / 1.35).
  • Labels, in order: MESSAGE, OPEN_APP, NAVIGATE_TO_SETTINGS, TRIGGER_AUDIO_MUTE, UNMUTE, PLAY_MEDIA, MEDIA_PAUSE, MEDIA_RESUME, MEDIA_NEXT, MEDIA_PREVIOUS, TWIN_TASK, IGNORE, VOLUME_UP, VOLUME_DOWN.
  • How the app decides: actions the phone's state makes impossible are set to zero (unmute when not muted, resume while playing, pause when nothing is playing). The most likely non-message label is taken only if its probability reaches the threshold for the context: 0.94 in a messaging box, 0.93 in another text box, 0.5 with no text box. Otherwise the words are typed (in a text box) or ignored (with none).

How well it works

Measured one sentence at a time, as the phone runs it:

Check Target Measured
A typed message read as a command at most 0.5% 0.16% (4 of 2,428)
Assistant requests recognised, home screen at least 95% 98.2% (1,325)
Speed, one CPU thread 95th percentile at most 10 ms 6.7 ms (a server CPU, not a phone)
Commands from 17 real people, all together at least 95% 88.6% (140 of 158)
Per command, real people at least 90% mute 100%, unmute 92.9%, play 93.6%, pause 90.5%, previous 88.2%, next 76.9%, resume 62.5%

This version was released although it misses four of those targets (the bold ones). It is better than the previous version on every command except resume. The real-people figures come from the same people whose mistakes were studied while building it, so they are on the optimistic side.

Limits

  • English only. Other languages must not be passed to it.
  • "Resume" is the weakest command. Some phrasings ("carry on playing", "unpause") are missed, and a few become a different action (usually starting new music). The app pairs this model with exact short commands for the plainest phrasings.
  • It decides what kind of request the words are. It does not pick the app or song; that is done without a model.

Training data

Generated template sentences; MASSIVE 1.1 en-US (Amazon, CC BY 4.0); Common Voice sentence text (CC0); answers written for a short phrasing survey. No audio was used.

Licence

Apache-2.0, as the base model. MASSIVE is used under CC BY 4.0: FitzGerald et al., "MASSIVE: A 1M-Example Multilingual Natural Language Understanding Dataset with 51 Typologically-Diverse Languages", 2022.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train MayaFdn/voice-gate-m1