naklitechie commited on
Commit
d025ec8
·
verified ·
1 Parent(s): cf9df34

Add ONNX export of facebook/mms-tts-pan for browser TTS.

Browse files
Files changed (7) hide show
  1. README.md +36 -0
  2. added_tokens.json +3 -0
  3. config.json +82 -0
  4. model.onnx +3 -0
  5. special_tokens_map.json +4 -0
  6. tokenizer_config.json +31 -0
  7. vocab.json +61 -0
README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - pa
4
+ license: cc-by-nc-4.0
5
+ library_name: transformers.js
6
+ pipeline_tag: text-to-audio
7
+ tags:
8
+ - onnx
9
+ - text-to-speech
10
+ - tts
11
+ - mms
12
+ - facebook
13
+ - pa
14
+ - onnxruntime-web
15
+ base_model: facebook/mms-tts-pan
16
+ ---
17
+
18
+ # MMS-TTS Punjabi — ONNX
19
+
20
+ Verbatim ONNX export of [`facebook/mms-tts-pan`](https://huggingface.co/facebook/mms-tts-pan)
21
+ for in-browser inference via [transformers.js](https://huggingface.co/docs/transformers.js)
22
+ or [onnxruntime-web](https://onnxruntime.ai/).
23
+
24
+ This bundle was produced by the [onnx-conversion](https://github.com/NakliTechie/onnx-conversion) pipeline at
25
+ `scripts/seq2seq/03_mms_batch_export.py` so the [Ghoshana](https://github.com/NakliTechie/Ghoshana)
26
+ browser app can ship MMS-TTS coverage for Punjabi without depending on
27
+ a system voice install.
28
+
29
+ The MMS family from [Massively Multilingual Speech](https://research.facebook.com/publications/scaling-speech-technology-to-1000-languages/)
30
+ covers 1107+ languages but only ~12 of those have community ONNX exports
31
+ (Xenova mostly), with `kn` (Kannada) at onnx-community. This repo fills
32
+ in the rest of the Punjabi gap.
33
+
34
+ ## License
35
+
36
+ CC-BY-NC-4.0 (inherited from the upstream `facebook/mms-tts-pan`).
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<unk>": 59
3
+ }
config.json ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_dropout": 0.1,
3
+ "architectures": [
4
+ "VitsModel"
5
+ ],
6
+ "attention_dropout": 0.1,
7
+ "depth_separable_channels": 2,
8
+ "depth_separable_num_layers": 3,
9
+ "dtype": "float32",
10
+ "duration_predictor_dropout": 0.5,
11
+ "duration_predictor_filter_channels": 256,
12
+ "duration_predictor_flow_bins": 10,
13
+ "duration_predictor_kernel_size": 3,
14
+ "duration_predictor_num_flows": 4,
15
+ "duration_predictor_tail_bound": 5.0,
16
+ "ffn_dim": 768,
17
+ "ffn_kernel_size": 3,
18
+ "flow_size": 192,
19
+ "hidden_act": "relu",
20
+ "hidden_dropout": 0.1,
21
+ "hidden_size": 192,
22
+ "initializer_range": 0.02,
23
+ "layer_norm_eps": 1e-05,
24
+ "layerdrop": 0.1,
25
+ "leaky_relu_slope": 0.1,
26
+ "model_type": "vits",
27
+ "noise_scale": 0.667,
28
+ "noise_scale_duration": 0.8,
29
+ "num_attention_heads": 2,
30
+ "num_hidden_layers": 6,
31
+ "num_speakers": 1,
32
+ "posterior_encoder_num_wavenet_layers": 16,
33
+ "prior_encoder_num_flows": 4,
34
+ "prior_encoder_num_wavenet_layers": 4,
35
+ "resblock_dilation_sizes": [
36
+ [
37
+ 1,
38
+ 3,
39
+ 5
40
+ ],
41
+ [
42
+ 1,
43
+ 3,
44
+ 5
45
+ ],
46
+ [
47
+ 1,
48
+ 3,
49
+ 5
50
+ ]
51
+ ],
52
+ "resblock_kernel_sizes": [
53
+ 3,
54
+ 7,
55
+ 11
56
+ ],
57
+ "sampling_rate": 16000,
58
+ "speaker_embedding_size": 0,
59
+ "speaking_rate": 1.0,
60
+ "spectrogram_bins": 513,
61
+ "transformers_version": "4.57.6",
62
+ "upsample_initial_channel": 512,
63
+ "upsample_kernel_sizes": [
64
+ 16,
65
+ 16,
66
+ 4,
67
+ 4
68
+ ],
69
+ "upsample_rates": [
70
+ 8,
71
+ 8,
72
+ 2,
73
+ 2
74
+ ],
75
+ "use_bias": true,
76
+ "use_stochastic_duration_prediction": true,
77
+ "vocab_size": 59,
78
+ "wavenet_dilation_rate": 1,
79
+ "wavenet_dropout": 0.0,
80
+ "wavenet_kernel_size": 5,
81
+ "window_size": 4
82
+ }
model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b25586bf8b8549e101d59d661a0729d3c2670b3a2da317fabc13ce556e2deecc
3
+ size 114302739
special_tokens_map.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "pad_token": "ਏ",
3
+ "unk_token": "<unk>"
4
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_blank": true,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "ਏ",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "59": {
13
+ "content": "<unk>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ }
20
+ },
21
+ "clean_up_tokenization_spaces": true,
22
+ "extra_special_tokens": {},
23
+ "is_uroman": false,
24
+ "language": "pan",
25
+ "model_max_length": 1000000000000000019884624838656,
26
+ "normalize": true,
27
+ "pad_token": "ਏ",
28
+ "phonemize": false,
29
+ "tokenizer_class": "VitsTokenizer",
30
+ "unk_token": "<unk>"
31
+ }
vocab.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ " ": 31,
3
+ "-": 5,
4
+ "6": 28,
5
+ "_": 7,
6
+ "l": 6,
7
+ "ਂ": 40,
8
+ "ਅ": 44,
9
+ "ਆ": 48,
10
+ "ਇ": 10,
11
+ "ਈ": 37,
12
+ "ਉ": 43,
13
+ "ਊ": 19,
14
+ "ਏ": 0,
15
+ "ਐ": 36,
16
+ "ਓ": 41,
17
+ "ਔ": 24,
18
+ "ਕ": 53,
19
+ "ਖ": 45,
20
+ "ਗ": 33,
21
+ "ਘ": 38,
22
+ "ਚ": 49,
23
+ "ਛ": 30,
24
+ "ਜ": 23,
25
+ "ਝ": 18,
26
+ "ਟ": 1,
27
+ "ਠ": 4,
28
+ "ਡ": 46,
29
+ "ਢ": 54,
30
+ "ਣ": 12,
31
+ "ਤ": 51,
32
+ "ਥ": 13,
33
+ "ਦ": 25,
34
+ "ਧ": 20,
35
+ "ਨ": 14,
36
+ "ਪ": 11,
37
+ "ਫ": 17,
38
+ "ਬ": 34,
39
+ "ਭ": 39,
40
+ "ਮ": 57,
41
+ "ਯ": 16,
42
+ "ਰ": 55,
43
+ "ਲ": 47,
44
+ "ਵ": 50,
45
+ "ਸ": 15,
46
+ "ਹ": 52,
47
+ "਼": 9,
48
+ "ਾ": 56,
49
+ "ਿ": 22,
50
+ "ੀ": 32,
51
+ "ੁ": 21,
52
+ "ੂ": 29,
53
+ "ੇ": 42,
54
+ "ੈ": 3,
55
+ "ੋ": 26,
56
+ "ੌ": 27,
57
+ "੍": 35,
58
+ "ੜ": 8,
59
+ "ੰ": 2,
60
+ "ੱ": 58
61
+ }