Jarbas commited on
Commit
6769e02
·
verified ·
1 Parent(s): ba4f857

Mirror onnx-community/moonshine-tiny-ONNX (Useful Sensors, MIT)

Browse files
README.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ library_name: onnx-asr
6
+ tags:
7
+ - onnx
8
+ - onnx-asr
9
+ - automatic-speech-recognition
10
+ - moonshine
11
+ base_model: UsefulSensors/moonshine-tiny
12
+ ---
13
+
14
+ # Moonshine Tiny (ONNX)
15
+
16
+ Moonshine Tiny is a compact English speech-to-text model from
17
+ [Useful Sensors](https://github.com/usefulsensors/moonshine). It is an
18
+ encoder-decoder model that reads the raw 16 kHz waveform, so it needs no
19
+ log-mel preprocessor.
20
+
21
+ This repository is a mirror of the official ONNX export
22
+ [onnx-community/moonshine-tiny-ONNX](https://huggingface.co/onnx-community/moonshine-tiny-ONNX),
23
+ kept so that the OpenVoiceOS ONNX ASR collection is self-contained. The
24
+ weights are unchanged.
25
+
26
+ ## Usage
27
+
28
+ ```py
29
+ import onnx_asr
30
+
31
+ model = onnx_asr.load_model("moonshine-tiny")
32
+ print(model.recognize("test.wav"))
33
+ ```
34
+
35
+ Quantized variants load with the `quantization` argument:
36
+
37
+ ```py
38
+ model = onnx_asr.load_model("moonshine-tiny", quantization="quantized")
39
+ ```
40
+
41
+ ## Credits
42
+
43
+ Model by Useful Sensors Inc., released under the MIT license. Paper:
44
+ [Moonshine: Speech Recognition for Live Transcription and Voice Commands](https://arxiv.org/abs/2410.15608).
45
+ ONNX export by [onnx-community](https://huggingface.co/onnx-community).
46
+
47
+ ## License
48
+
49
+ MIT
config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MoonshineForConditionalGeneration"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 1,
8
+ "decoder_hidden_act": "silu",
9
+ "decoder_num_attention_heads": 8,
10
+ "decoder_num_hidden_layers": 6,
11
+ "decoder_num_key_value_heads": 8,
12
+ "decoder_start_token_id": 1,
13
+ "encoder_hidden_act": "gelu",
14
+ "encoder_num_attention_heads": 8,
15
+ "encoder_num_hidden_layers": 6,
16
+ "encoder_num_key_value_heads": 8,
17
+ "eos_token_id": 2,
18
+ "hidden_size": 288,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 1152,
21
+ "is_encoder_decoder": true,
22
+ "max_position_embeddings": 512,
23
+ "model_type": "moonshine",
24
+ "num_attention_heads": 8,
25
+ "num_hidden_layers": 6,
26
+ "num_key_value_heads": 8,
27
+ "partial_rotary_factor": 0.9,
28
+ "rope_scaling": null,
29
+ "rope_theta": 10000.0,
30
+ "torch_dtype": "float32",
31
+ "transformers_version": "4.48.0.dev0",
32
+ "use_cache": true,
33
+ "vocab_size": 32768
34
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "decoder_start_token_id": 1,
5
+ "eos_token_id": 2,
6
+ "transformers_version": "4.47.0.dev0"
7
+ }
onnx/decoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19dfea5cba225eb38c0dc7b6e6b9464da6cb46266eab7dbcc8f3d5f9a5f5d79e
3
+ size 77906761
onnx/decoder_model_merged.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4131cef00b62942e9cdef691101f2cc7dbbcd828d71eee8c6c46c28fd051d6cb
3
+ size 78227550
onnx/decoder_model_merged_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:235addb963ef3997766bc126c3f16561a72370c7c797238e96940c4f76f2c69a
3
+ size 76250574
onnx/decoder_model_merged_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd126e9e95c62b2236116f676f80877ddde488599631014149f92196cd8ae3a7
3
+ size 20189512
onnx/decoder_model_merged_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:451510e9bc0d4d829e50f4feffda384a38fd0a7cc8aee72667b8fdb1fb4c7e08
3
+ size 44650684
onnx/decoder_model_merged_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eed87831c3a6103534aae7d47a5d485025c659a1323901513961c39fe8a1a367
3
+ size 20243286
onnx/decoder_with_past_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebbdfd5dacc138a78ca3904d2305335687dd5dbc4daae09b2a7affaac8149789
3
+ size 73867894
onnx/encoder_model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbbf580f703b2af2137e0f6d14cd87f31cc67bd858bfd8715403a9489982d1a5
3
+ size 30882331
onnx/encoder_model_fp16.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ccbec5181641f717611fc641ff7e261b4ee7b538e307c39e57e38f617a294d6e
3
+ size 15520007
onnx/encoder_model_int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2981b85cfd6a4647ec37fe139e268cbc2c8a24102bf1fbb70dedeb7964995be8
3
+ size 7919835
onnx/encoder_model_q4.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f4c63779321f20e880148d677a7aeccaa8ac572ec5c8de1e53337915b26f26a
3
+ size 10732274
onnx/encoder_model_quantized.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6fc4b7bc5af75c0591fd157a1f3829b533d18e9769a888fd95a62e470dd4f4a
3
+ size 7937661
preprocessor_config.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "feature_extractor_type": "MoonshineFeatureExtractor",
3
+ "processor_class": "MoonshineProcessor",
4
+ "sampling_rate": 16000
5
+ }
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff