diff --git a/.gitattributes b/.gitattributes
index 04a53b454822d2ddb58824e18bbea693c303b436..570f0b9741be1ffd4c9a8c8d2cd9c0abe2018479 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -34,3 +34,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
model/am_enc.axmodel filter=lfs diff=lfs merge=lfs -text
+model/voc.axmodel filter=lfs diff=lfs merge=lfs -text
+sdk/axrt/lib/libax_engine.so filter=lfs diff=lfs merge=lfs -text
diff --git a/model/host_weights/pitch_blstm_w_hh_r.bin b/model/host_weights/pitch_blstm_w_hh_r.bin
new file mode 100644
index 0000000000000000000000000000000000000000..2da4c70bfda3323997cbbc48e5900c51c943ec68
--- /dev/null
+++ b/model/host_weights/pitch_blstm_w_hh_r.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bebfb3c4f3bf53dae74ea00dcee4cfd02f6ddd4e84a34eedeed6d065cc38738c
+size 262144
diff --git a/model/host_weights/pitch_blstm_w_ih.bin b/model/host_weights/pitch_blstm_w_ih.bin
new file mode 100644
index 0000000000000000000000000000000000000000..0bee2002cef6b833a56bc4f55f955a141df25d8e
--- /dev/null
+++ b/model/host_weights/pitch_blstm_w_ih.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5ee8c96cf9a6cf7c46adad0b4307820e18c381bf798d79a5938099e7372012e6
+size 262144
diff --git a/model/host_weights/pitch_blstm_w_ih_r.bin b/model/host_weights/pitch_blstm_w_ih_r.bin
new file mode 100644
index 0000000000000000000000000000000000000000..41ebf5282c9b4c5052abc5ea37f06953bb766341
--- /dev/null
+++ b/model/host_weights/pitch_blstm_w_ih_r.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7ca71682a007aa95d85dea93cbfa9a44194249e72f665bf05e439f8a52359285
+size 262144
diff --git a/model/host_weights/pitch_emb_b.bin b/model/host_weights/pitch_emb_b.bin
new file mode 100644
index 0000000000000000000000000000000000000000..a4d41f506c02f3b4b55a1b9aed5a485d830d9566
--- /dev/null
+++ b/model/host_weights/pitch_emb_b.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c7550efbd238394fd6192fe94d0c504e3d987b4bf4f175555b36572f397f84d
+size 128
diff --git a/model/host_weights/pitch_emb_w.bin b/model/host_weights/pitch_emb_w.bin
new file mode 100644
index 0000000000000000000000000000000000000000..8d955ffce1ba42304641441e30e8c036ad801d5d
--- /dev/null
+++ b/model/host_weights/pitch_emb_w.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ccdb4861d33a3b4152718a2f3dd69769dfd1454b896fb2b124ad9790b437dc74
+size 1152
diff --git a/model/host_weights/pitch_fc_b.bin b/model/host_weights/pitch_fc_b.bin
new file mode 100644
index 0000000000000000000000000000000000000000..5c9ca129952df9c55c6d608a85054732108eff40
--- /dev/null
+++ b/model/host_weights/pitch_fc_b.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4218e2eba8d5f8fac0b94773afe180c739466292a372f58ddca956ec62a07c52
+size 4
diff --git a/model/host_weights/pitch_fc_w.bin b/model/host_weights/pitch_fc_w.bin
new file mode 100644
index 0000000000000000000000000000000000000000..baee1fb62a87d567af0b2ef6ff42fb2b90b49040
--- /dev/null
+++ b/model/host_weights/pitch_fc_w.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fa457844509d05e9a484d5a51bdc81d1bf1c9475de0c77e4a113b9509c4ad9b7
+size 1024
diff --git a/model/host_weights/pitch_ffn0_b1.bin b/model/host_weights/pitch_ffn0_b1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..53b40fe5e9b2e89b919f98ed90fdf58a6f2edbc9
--- /dev/null
+++ b/model/host_weights/pitch_ffn0_b1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c7ac8cad868f6edb5250c33b968d555801d0f73b8821fb69befe459b9837053e
+size 1024
diff --git a/model/host_weights/pitch_ffn0_b2.bin b/model/host_weights/pitch_ffn0_b2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..c30ec76e65777765c8e1e7545976f86790ed51a1
--- /dev/null
+++ b/model/host_weights/pitch_ffn0_b2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:076a27c79e5ace2a3d47f9dd2e83e4ff6ea8872b3c2218f66c92b89b55f36560
+size 512
diff --git a/model/host_weights/pitch_ffn0_w1.bin b/model/host_weights/pitch_ffn0_w1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..effbe426f30c95f0a2444657f714e34f92bd550d
--- /dev/null
+++ b/model/host_weights/pitch_ffn0_w1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4207c41656057618298828dcad4ba4fe57cc08ea169675c81c84f7363a93139a
+size 98304
diff --git a/model/host_weights/pitch_ffn0_w2.bin b/model/host_weights/pitch_ffn0_w2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..7650357abc86451e1a604199d82d121fb8b3c552
--- /dev/null
+++ b/model/host_weights/pitch_ffn0_w2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59e0867d69bac5ed1e01f33a72439036ce61320b241b7b2da3f06cb8710ead7d
+size 131072
diff --git a/model/host_weights/pitch_ffn1_b1.bin b/model/host_weights/pitch_ffn1_b1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..2839d3438546dffcf0ca1e09e83f2bf7236e7043
--- /dev/null
+++ b/model/host_weights/pitch_ffn1_b1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:240d840ac84faf5b9cb8bd468e7addd7c2830376f0579892ba29f27e136e7279
+size 1024
diff --git a/model/host_weights/pitch_ffn1_b2.bin b/model/host_weights/pitch_ffn1_b2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..c30ec76e65777765c8e1e7545976f86790ed51a1
--- /dev/null
+++ b/model/host_weights/pitch_ffn1_b2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:076a27c79e5ace2a3d47f9dd2e83e4ff6ea8872b3c2218f66c92b89b55f36560
+size 512
diff --git a/model/host_weights/pitch_ffn1_w1.bin b/model/host_weights/pitch_ffn1_w1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..118796f3499b0dec2df08a45c68c7b29a5622f01
--- /dev/null
+++ b/model/host_weights/pitch_ffn1_w1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:83ac13809722d52f0c095fc93cf22bfce943c84e98f1cf17d15d4fcc8eda42c8
+size 131072
diff --git a/model/host_weights/pitch_ffn1_w2.bin b/model/host_weights/pitch_ffn1_w2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..cd20d148686fc5e26e3e6f204ffbdd6d3fafdd80
--- /dev/null
+++ b/model/host_weights/pitch_ffn1_w2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b03c73a54bf4dab5bb221cd76563ed608575e4d7f48fdf793954776c83ab3b5a
+size 131072
diff --git a/model/host_weights/pitch_ffn2_b1.bin b/model/host_weights/pitch_ffn2_b1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..2e83b95c2f3270991ebcb273dbaf173c26d605a1
--- /dev/null
+++ b/model/host_weights/pitch_ffn2_b1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2a4018a6abe70f329996d08e7baa64821700ef5d130e182080d2ecae43484ce4
+size 1024
diff --git a/model/host_weights/pitch_ffn2_b2.bin b/model/host_weights/pitch_ffn2_b2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..c30ec76e65777765c8e1e7545976f86790ed51a1
--- /dev/null
+++ b/model/host_weights/pitch_ffn2_b2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:076a27c79e5ace2a3d47f9dd2e83e4ff6ea8872b3c2218f66c92b89b55f36560
+size 512
diff --git a/model/host_weights/pitch_ffn2_w1.bin b/model/host_weights/pitch_ffn2_w1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..6459e1021ee98ca77895ad5641c6a6ea5917058f
--- /dev/null
+++ b/model/host_weights/pitch_ffn2_w1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8f159f48f2840d6f81a37616ea9309dcd6ded8caed5d0f52cd7ab64fc1e44f9c
+size 131072
diff --git a/model/host_weights/pitch_ffn2_w2.bin b/model/host_weights/pitch_ffn2_w2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..f07c444c9a4cd909f2b5cfdb64d79cf2e85ff62e
--- /dev/null
+++ b/model/host_weights/pitch_ffn2_w2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e05c2e254e8c724e411c9adf4e334f9d4636f741b062243581d2d17d77c48061
+size 131072
diff --git a/model/host_weights/pitch_mem0_conv.bin b/model/host_weights/pitch_mem0_conv.bin
new file mode 100644
index 0000000000000000000000000000000000000000..7438bdaa0c88defea0bead66e539aec999f68aaa
--- /dev/null
+++ b/model/host_weights/pitch_mem0_conv.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1ad455d7234aea2fac97755b7c1a8a19e7f707a05d8666e4a4c4fc518a0013f0
+size 20992
diff --git a/model/host_weights/pitch_mem1_conv.bin b/model/host_weights/pitch_mem1_conv.bin
new file mode 100644
index 0000000000000000000000000000000000000000..a09784d517ed450761a1c6d41e4ca1776cd380bf
--- /dev/null
+++ b/model/host_weights/pitch_mem1_conv.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7c580d3dae6f5f3eaf6a4b41bbd4596e44e74bfe3d50b78095f3cb803dea1a2c
+size 20992
diff --git a/model/host_weights/pitch_mem2_conv.bin b/model/host_weights/pitch_mem2_conv.bin
new file mode 100644
index 0000000000000000000000000000000000000000..6950ef538c50e4e233191b8d22b6627f4986e73e
--- /dev/null
+++ b/model/host_weights/pitch_mem2_conv.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9adca3859e8dfc3a4b2b4c5c7a5f75bf7c49c094ffc482c20c70ac4d8d5d5d64
+size 20992
diff --git a/model/host_weights/pos_enc.bin b/model/host_weights/pos_enc.bin
new file mode 100644
index 0000000000000000000000000000000000000000..7359ebdf4fd9ca58ba2e666e21aea0f3af7d1a40
--- /dev/null
+++ b/model/host_weights/pos_enc.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:df602d3e8496e6fad3fdbb72919833907cef886256fcfa1a822c5ff098bd565b
+size 262144
diff --git a/model/host_weights/post_fc_b.bin b/model/host_weights/post_fc_b.bin
new file mode 100644
index 0000000000000000000000000000000000000000..f97c1cbc50d68be58346adc5a4811e6968d3eb87
--- /dev/null
+++ b/model/host_weights/post_fc_b.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d5e5e2c3c535b656b2c872c9bdfc12c65533a465dc2c9585c4ba412c506ac51
+size 320
diff --git a/model/host_weights/post_fc_w.bin b/model/host_weights/post_fc_w.bin
new file mode 100644
index 0000000000000000000000000000000000000000..456196e4a87e7acb916124be1d9ac4debed767b1
--- /dev/null
+++ b/model/host_weights/post_fc_w.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:09b8f19bce4a509698d4f99a6fb7f2fd3ab8c090de1513a6797a939d675fd6ac
+size 40960
diff --git a/model/host_weights/post_ffn0_b1.bin b/model/host_weights/post_ffn0_b1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..bf37440d7c9371348496d95af5d23573e1497228
--- /dev/null
+++ b/model/host_weights/post_ffn0_b1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ef94d5e3f2a0e79c33ae2b96c96b9ebd5d383787c27ecd600eb38ddd77613a76
+size 2048
diff --git a/model/host_weights/post_ffn0_b2.bin b/model/host_weights/post_ffn0_b2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..abc8240e440587e9d4b59102163573492833ac8a
--- /dev/null
+++ b/model/host_weights/post_ffn0_b2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef
+size 1024
diff --git a/model/host_weights/post_ffn0_w1.bin b/model/host_weights/post_ffn0_w1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..3539d811f524f7d9f810e8b0728f1a82fabe4280
--- /dev/null
+++ b/model/host_weights/post_ffn0_w1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:08bc3ace0492c871f5645149c2ffcd6915a5aaa85b71a0b2ff180d7f5819067f
+size 163840
diff --git a/model/host_weights/post_ffn0_w2.bin b/model/host_weights/post_ffn0_w2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..1c2ee23ef092e41a0f1cc5a8f21e53e186adbd48
--- /dev/null
+++ b/model/host_weights/post_ffn0_w2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ea01a6bca54c04d30a365b8be5e2a411f5f3dd87cd266ce3ab5a11419f9c44a4
+size 524288
diff --git a/model/host_weights/post_ffn1_b1.bin b/model/host_weights/post_ffn1_b1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..1bf0470a4bce214ca37f62747cfedee0bb9e4df2
--- /dev/null
+++ b/model/host_weights/post_ffn1_b1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0f3bb236876a3d7c6bfbd8afa2ca7767d99a6c55fd0b93e237e2b6e9712dcd30
+size 2048
diff --git a/model/host_weights/post_ffn1_b2.bin b/model/host_weights/post_ffn1_b2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..abc8240e440587e9d4b59102163573492833ac8a
--- /dev/null
+++ b/model/host_weights/post_ffn1_b2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef
+size 1024
diff --git a/model/host_weights/post_ffn1_w1.bin b/model/host_weights/post_ffn1_w1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..6b9540083a2900821e0207c00070d1eea4dc7c31
--- /dev/null
+++ b/model/host_weights/post_ffn1_w1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b0fa19de8424d4f3853f514cafb31b48d80f60512fb46e1b7e5601c9c9ab51a4
+size 524288
diff --git a/model/host_weights/post_ffn1_w2.bin b/model/host_weights/post_ffn1_w2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..21d52085951c30e11b2f7ebd90dc659b636e98c2
--- /dev/null
+++ b/model/host_weights/post_ffn1_w2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d0f2f562514dcea740253eeb253fab63283f3f9eacf2a8f5dbc2708a7665275a
+size 524288
diff --git a/model/host_weights/post_ffn2_b1.bin b/model/host_weights/post_ffn2_b1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..34cb5729e32cdc5dc078bbfe05b489c3e32cee2f
--- /dev/null
+++ b/model/host_weights/post_ffn2_b1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fa0ecc1f9c890ab39614146b7a23f506000395c38ac41f86d32fb3e1046a6ef7
+size 2048
diff --git a/model/host_weights/post_ffn2_b2.bin b/model/host_weights/post_ffn2_b2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..abc8240e440587e9d4b59102163573492833ac8a
--- /dev/null
+++ b/model/host_weights/post_ffn2_b2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef
+size 1024
diff --git a/model/host_weights/post_ffn2_w1.bin b/model/host_weights/post_ffn2_w1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..a3a4a2506dc3dde8f2c05da1cce3e15b69d61958
--- /dev/null
+++ b/model/host_weights/post_ffn2_w1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d543c4ada85df0414c8f1d7d2fde31304d980b21b61d37594a580909d2de0f0
+size 524288
diff --git a/model/host_weights/post_ffn2_w2.bin b/model/host_weights/post_ffn2_w2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..4ccb4d415472ffbb0fe8cb73783ef5ad62ce22bd
--- /dev/null
+++ b/model/host_weights/post_ffn2_w2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:07fd20b73638f4ab0d1474c217232a9160551937050e4a0ee609f5a37344b502
+size 524288
diff --git a/model/host_weights/post_ffn3_b1.bin b/model/host_weights/post_ffn3_b1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..c26a5ec4a5e26069181ed85691addddc5b1cd70e
--- /dev/null
+++ b/model/host_weights/post_ffn3_b1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:145df1464e137352a9de4ea3f9f0d827e3e865e710a565b3382abfbd50b09bdd
+size 2048
diff --git a/model/host_weights/post_ffn3_b2.bin b/model/host_weights/post_ffn3_b2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..abc8240e440587e9d4b59102163573492833ac8a
--- /dev/null
+++ b/model/host_weights/post_ffn3_b2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef
+size 1024
diff --git a/model/host_weights/post_ffn3_w1.bin b/model/host_weights/post_ffn3_w1.bin
new file mode 100644
index 0000000000000000000000000000000000000000..4ef4dd48de7da4c225281cc1c2e8d0160e00d2b7
--- /dev/null
+++ b/model/host_weights/post_ffn3_w1.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e415f0903db09f50bc335e2fe6664366f1d0f3ca666abba59915f72d6e502878
+size 524288
diff --git a/model/host_weights/post_ffn3_w2.bin b/model/host_weights/post_ffn3_w2.bin
new file mode 100644
index 0000000000000000000000000000000000000000..ee7d912d15fb14bac33a65bb8aed2fb5dcac227f
--- /dev/null
+++ b/model/host_weights/post_ffn3_w2.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7fc6bec673b62b1a9410d73a0d4f7776da999023610605eaecdb13b32e8a7eb8
+size 524288
diff --git a/model/host_weights/post_lstm_b_hh.bin b/model/host_weights/post_lstm_b_hh.bin
new file mode 100644
index 0000000000000000000000000000000000000000..aeb4b26e0a76410fa1d162730fe1882dd7a3314f
--- /dev/null
+++ b/model/host_weights/post_lstm_b_hh.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e5a00aa9991ac8a5ee3109844d84a55583bd20572ad3ffcd42792f3c36b183ad
+size 2048
diff --git a/model/host_weights/post_lstm_b_ih.bin b/model/host_weights/post_lstm_b_ih.bin
new file mode 100644
index 0000000000000000000000000000000000000000..c0b0df5515ffdbd972790004fc16eb6732ca4ab4
--- /dev/null
+++ b/model/host_weights/post_lstm_b_ih.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7f2b8a6ccb1980785a8eb1c59328143f5a3cfad6450b2ee119ef113c89745133
+size 2048
diff --git a/model/host_weights/post_lstm_w_hh.bin b/model/host_weights/post_lstm_w_hh.bin
new file mode 100644
index 0000000000000000000000000000000000000000..8c27d6ada71c9b5705f832c2f7cb68dcac3ac615
--- /dev/null
+++ b/model/host_weights/post_lstm_w_hh.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:21e03c2d2c8557f992edb80f2745373bb840f0bac42e3a77127a702d32d192ac
+size 262144
diff --git a/model/host_weights/post_lstm_w_ih.bin b/model/host_weights/post_lstm_w_ih.bin
new file mode 100644
index 0000000000000000000000000000000000000000..064b238421ef73fbac311c1765a9a9b636fc4878
--- /dev/null
+++ b/model/host_weights/post_lstm_w_ih.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:391ac2a71817eb8fc25ac37a80da9f3e7323c8c787d858c4164cef9e8a1be925
+size 524288
diff --git a/model/host_weights/post_mem0_conv.bin b/model/host_weights/post_mem0_conv.bin
new file mode 100644
index 0000000000000000000000000000000000000000..8dd4f95cab78527cc18893733257134c519d9ad6
--- /dev/null
+++ b/model/host_weights/post_mem0_conv.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b2da93a32b44f37d1d4c048d77eb68e99b2ed9f9ed07e5f4de247825fd4fe839
+size 41984
diff --git a/model/host_weights/post_mem1_conv.bin b/model/host_weights/post_mem1_conv.bin
new file mode 100644
index 0000000000000000000000000000000000000000..01bc4606999e88ccc5bab84c4374a51976d6a56c
--- /dev/null
+++ b/model/host_weights/post_mem1_conv.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:31db5877bb42d6dc46c6c59050729683227df3bc6e6b3686ac1a6f7ebf5c987e
+size 41984
diff --git a/model/host_weights/post_mem2_conv.bin b/model/host_weights/post_mem2_conv.bin
new file mode 100644
index 0000000000000000000000000000000000000000..6c71f790f83c8acc6c6ea77271c9b553ca5a4867
--- /dev/null
+++ b/model/host_weights/post_mem2_conv.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0f7981139bc8fe93723224843d50a58385dae5490af0d2f9666f2c6a16711ea6
+size 41984
diff --git a/model/host_weights/post_mem3_conv.bin b/model/host_weights/post_mem3_conv.bin
new file mode 100644
index 0000000000000000000000000000000000000000..243e3d05d0071b454a9552e55f956ca7b84756ff
--- /dev/null
+++ b/model/host_weights/post_mem3_conv.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9270e32737a21eff05dd782734fcbd602c3010758dbb935dd1144995ccea8845
+size 41984
diff --git a/model/host_weights/pre0_b.bin b/model/host_weights/pre0_b.bin
new file mode 100644
index 0000000000000000000000000000000000000000..a05cbf864d38013a23cc25106135cfef498a2f73
--- /dev/null
+++ b/model/host_weights/pre0_b.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d7b4ec4a5bed05fabc79e1e41b9d70d499933372a30cae392256061048f2f33
+size 1024
diff --git a/model/host_weights/pre0_w.bin b/model/host_weights/pre0_w.bin
new file mode 100644
index 0000000000000000000000000000000000000000..42e4795168bde9b66255829c52cfe925672339eb
--- /dev/null
+++ b/model/host_weights/pre0_w.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a28c96b1be71eaa2ea8956501858e561ce364a9ae1ae37a4872de74afcc65bde
+size 81920
diff --git a/model/host_weights/pre1_b.bin b/model/host_weights/pre1_b.bin
new file mode 100644
index 0000000000000000000000000000000000000000..471743c6a69f8713a1054783f7a12e6edaa1e088
--- /dev/null
+++ b/model/host_weights/pre1_b.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7137bc76dd9bbc1ee61044aad3eb7b1787740822f8e5f72da1a9ce42f5f6ea61
+size 1024
diff --git a/model/host_weights/pre1_w.bin b/model/host_weights/pre1_w.bin
new file mode 100644
index 0000000000000000000000000000000000000000..30526403aea25a59d5712c021915d8f098b2832a
--- /dev/null
+++ b/model/host_weights/pre1_w.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f870209232649fe16056f672d7b357b0ef8ad16b3d4d80fe50954450de37801
+size 262144
diff --git a/model/host_weights/pre2_b.bin b/model/host_weights/pre2_b.bin
new file mode 100644
index 0000000000000000000000000000000000000000..b9a4fad15345f949f72d6730a5903cc1d76d8838
--- /dev/null
+++ b/model/host_weights/pre2_b.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:36731f703efd9f5034634b0f1b3863f5e05a67871691af5f27d3231c0103bdce
+size 512
diff --git a/model/host_weights/pre2_w.bin b/model/host_weights/pre2_w.bin
new file mode 100644
index 0000000000000000000000000000000000000000..ef0e68fc202f8003ef8abbf535568610dd9d6421
--- /dev/null
+++ b/model/host_weights/pre2_w.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7ef732efe39bf0135197e69076574921afae57a2322f797d3316e29a82b4de1c
+size 131072
diff --git a/model/host_weights/proj_b.bin b/model/host_weights/proj_b.bin
new file mode 100644
index 0000000000000000000000000000000000000000..55dc419f276b7ae82ae78a91bd087f691cd35cdf
--- /dev/null
+++ b/model/host_weights/proj_b.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:de61d4d7ae812e7ba88143af6a5ba896efbc755db14f15eda8061d1d8c868d89
+size 512
diff --git a/model/host_weights/proj_w.bin b/model/host_weights/proj_w.bin
new file mode 100644
index 0000000000000000000000000000000000000000..1930e67926a7c107c4d8dd7dfade142e4ecfa9b3
--- /dev/null
+++ b/model/host_weights/proj_w.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ff830595077d2e4f92e3f553fc98bd86c5328693f87867446c8f3fff700da5cb
+size 147456
diff --git a/model/host_weights/spk_emb.bin b/model/host_weights/spk_emb.bin
new file mode 100644
index 0000000000000000000000000000000000000000..c3b14ca5962bfd3883161d5134cc4ff65edb3fd5
--- /dev/null
+++ b/model/host_weights/spk_emb.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:00c92c44e4f6a019bde0728277180caf636baae94e076c3011573654f51c74b6
+size 1152
diff --git a/model/host_weights/sy_emb.bin b/model/host_weights/sy_emb.bin
new file mode 100644
index 0000000000000000000000000000000000000000..4c6ff7352c2f2187e8fd365f403c07b54eefe96a
--- /dev/null
+++ b/model/host_weights/sy_emb.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:28a08f9d6a0c00b301598dbbe4bf040a90077fd924a967cf3322efd1faa4a5ec
+size 301056
diff --git a/model/host_weights/syll_emb.bin b/model/host_weights/syll_emb.bin
new file mode 100644
index 0000000000000000000000000000000000000000..865c16c627ec8bdf4bbaf7d02a8f844e8dedd7d6
--- /dev/null
+++ b/model/host_weights/syll_emb.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9dec2d8247596c55a72b3275ae36b8df662628c0c4d5870ff78bef32ec7db0ba
+size 16384
diff --git a/model/host_weights/tone_emb.bin b/model/host_weights/tone_emb.bin
new file mode 100644
index 0000000000000000000000000000000000000000..216caeadbda4de554b155105711fccf2e440a6b5
--- /dev/null
+++ b/model/host_weights/tone_emb.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b0b115995bb3b47898c7dab5b9ec98a5ef51f8fe8b5007c9b2ff691e8c7521b6
+size 20480
diff --git a/model/host_weights/ws_emb.bin b/model/host_weights/ws_emb.bin
new file mode 100644
index 0000000000000000000000000000000000000000..d53af5f2e2c9341afeb55eb5adec4f3b1ad2e49e
--- /dev/null
+++ b/model/host_weights/ws_emb.bin
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:29261bff3e0707e6314c129bfd59433988fd666d52e5b23e1d4b500d63559a4a
+size 16384
diff --git a/model/resource/PinYin/PhoneSet.xml b/model/resource/PinYin/PhoneSet.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4e685e21c2b5fdfee44d6316bc89fa6f59745427
--- /dev/null
+++ b/model/resource/PinYin/PhoneSet.xml
@@ -0,0 +1,1263 @@
+
+
+
+ 0
+ a_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 1
+ ai_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 2
+ an_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 3
+ ang_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 4
+ ao_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 5
+ b_c
+ vowel
+ initial
+ unvoiced
+ low
+ open
+
+
+ 6
+ c_c
+ vowel
+ initial
+ unvoiced
+ low
+ open
+
+
+ 7
+ ch_c
+ vowel
+ initial
+ unvoiced
+ low
+ open
+
+
+ 8
+ d_c
+ vowel
+ initial
+ unvoiced
+ low
+ open
+
+
+ 9
+ e_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 10
+ ei_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 11
+ en_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 12
+ eng_c
+ vowel
+ final
+ voiced
+ doublelips
+ stop
+
+
+ 13
+ er_c
+ vowel
+ final
+ voiced
+ doublelips
+ stop
+
+
+ 14
+ f_c
+ vowel
+ initial
+ unvoiced
+ doublelips
+ stop
+
+
+ 15
+ g_c
+ vowel
+ initial
+ unvoiced
+ fronttongue
+ affricative
+
+
+ 16
+ h_c
+ vowel
+ initial
+ unvoiced
+ backtongue
+ affricative
+
+
+ 17
+ i_c
+ vowel
+ final
+ voiced
+ backtongue
+ affricative
+
+
+ 18
+ ia_c
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 19
+ ian_c
+ vowel
+ final
+ voiced
+ centraltongue
+ stop
+
+
+ 20
+ iang_c
+ vowel
+ final
+ voiced
+ centraltongue
+ stop
+
+
+ 21
+ iao_c
+ vowel
+ final
+ voiced
+ centraltongue
+ stop
+
+
+ 22
+ ie_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 23
+ ih_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 24
+ ii_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 25
+ in_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 26
+ ing_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 27
+ io_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 28
+ iong_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 29
+ iou_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 30
+ j_c
+ vowel
+ initial
+ unvoiced
+ middle
+ open
+
+
+ 31
+ k_c
+ vowel
+ initial
+ unvoiced
+ middle
+ open
+
+
+ 32
+ l_c
+ vowel
+ initial
+ voiced
+ middle
+ open
+
+
+ 33
+ m_c
+ vowel
+ initial
+ voiced
+ middle
+ open
+
+
+ 34
+ n_c
+ vowel
+ initial
+ voiced
+ middle
+ open
+
+
+ 35
+ o_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 36
+ ong_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 37
+ ou_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 38
+ p_c
+ vowel
+ initial
+ unvoiced
+ liptooth
+ fricative
+
+
+ 39
+ q_c
+ vowel
+ initial
+ unvoiced
+ liptooth
+ fricative
+
+
+ 40
+ r_c
+ vowel
+ initial
+ voiced
+ velar
+ stop
+
+
+ 41
+ s_c
+ vowel
+ initial
+ unvoiced
+ low
+ open
+
+
+ 42
+ sh_c
+ vowel
+ initial
+ unvoiced
+ middle
+ open
+
+
+ 43
+ t_c
+ vowel
+ initial
+ unvoiced
+ middle
+ open
+
+
+ 44
+ u_c
+ vowel
+ final
+ voiced
+ velar
+ stop
+
+
+ 45
+ ua_c
+ vowel
+ final
+ voiced
+ velar
+ fricative
+
+
+ 46
+ uai_c
+ vowel
+ final
+ voiced
+ velar
+ fricative
+
+
+ 47
+ uan_c
+ vowel
+ final
+ voiced
+ high
+ close
+
+
+ 48
+ uang_c
+ vowel
+ final
+ voiced
+ high
+ close
+
+
+ 49
+ uei_c
+ vowel
+ final
+ voiced
+ high
+ close
+
+
+ 50
+ uen_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 51
+ ueng_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 52
+ uo_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 53
+ v_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 54
+ van_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 55
+ ve_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 56
+ vn_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 57
+ xx_c
+ vowel
+ initial
+ unvoiced
+ high
+ close
+
+
+ 58
+ z_c
+ vowel
+ initial
+ unvoiced
+ high
+ close
+
+
+ 59
+ zh_c
+ vowel
+ initial
+ unvoiced
+ high
+ close
+
+
+ 60
+ w_c
+ consonant
+ initial
+ unvoiced
+ high
+ close
+
+
+ 61
+ y_c
+ consonant
+ initial
+ unvoiced
+ high
+ close
+
+
+ 62
+ ga
+ consonant
+ initial
+ voiced
+ centraltongue
+ lateral
+
+
+ 63
+ ge
+ consonant
+ initial
+ voiced
+ centraltongue
+ lateral
+
+
+ 64
+ go
+ consonant
+ initial
+ voiced
+ centraltongue
+ lateral
+
+
+ 65
+ aa
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 66
+ ae
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 67
+ ah
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 68
+ ao
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 69
+ aw
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 70
+ ay
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 71
+ b
+ consonant
+ initial
+ unvoiced
+ doublelips
+ stop
+
+
+ 72
+ ch
+ consonant
+ initial
+ unvoiced
+ backtongue
+ affricative
+
+
+ 73
+ d
+ consonant
+ initial
+ unvoiced
+ centraltongue
+ stop
+
+
+ 74
+ dh
+ consonant
+ initial
+ unvoiced
+ fronttongue
+ affricative
+
+
+ 75
+ eh
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 76
+ er
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 77
+ ey
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 78
+ f
+ consonant
+ initial
+ unvoiced
+ liptooth
+ fricative
+
+
+ 79
+ g
+ consonant
+ initial
+ unvoiced
+ velar
+ stop
+
+
+ 80
+ hh
+ consonant
+ initial
+ unvoiced
+ fronttongue
+ affricative
+
+
+ 81
+ ih
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 82
+ iy
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 83
+ jh
+ consonant
+ initial
+ unvoiced
+ fronttongue
+ affricative
+
+
+ 84
+ k
+ consonant
+ initial
+ unvoiced
+ velar
+ stop
+
+
+ 85
+ l
+ consonant
+ initial
+ voiced
+ centraltongue
+ lateral
+
+
+ 86
+ m
+ consonant
+ initial
+ voiced
+ doublelips
+ nasal
+
+
+ 87
+ n
+ consonant
+ initial
+ voiced
+ centraltongue
+ nasal
+
+
+ 88
+ ng
+ consonant
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 89
+ ow
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 90
+ oy
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 91
+ p
+ consonant
+ initial
+ unvoiced
+ doublelips
+ stop
+
+
+ 92
+ r
+ consonant
+ initial
+ voiced
+ backtongue
+ fricative
+
+
+ 93
+ s
+ consonant
+ initial
+ unvoiced
+ fronttongue
+ fricative
+
+
+ 94
+ sh
+ consonant
+ initial
+ unvoiced
+ backtongue
+ fricative
+
+
+ 95
+ t
+ consonant
+ initial
+ unvoiced
+ centraltongue
+ stop
+
+
+ 96
+ th
+ consonant
+ initial
+ unvoiced
+ fronttongue
+ affricative
+
+
+ 97
+ uh
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 98
+ uw
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 99
+ v
+ consonant
+ initial
+ unvoiced
+ fronttongue
+ affricative
+
+
+ 100
+ w
+ consonant
+ initial
+ unvoiced
+ fronttongue
+ affricative
+
+
+ 101
+ y
+ consonant
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 102
+ z
+ consonant
+ initial
+ unvoiced
+ fronttongue
+ affricative
+
+
+ 103
+ zh
+ consonant
+ initial
+ unvoiced
+ backtongue
+ affricative
+
+
+ 104
+ air_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 105
+ angr_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 106
+ anr_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 107
+ aor_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 108
+ ar_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 109
+ eir_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 110
+ engr_c
+ vowel
+ final
+ voiced
+ doublelips
+ stop
+
+
+ 111
+ enr_c
+ vowel
+ final
+ voiced
+ low
+ open
+
+
+ 112
+ iangr_c
+ vowel
+ final
+ voiced
+ centraltongue
+ stop
+
+
+ 113
+ ianr_c
+ vowel
+ final
+ voiced
+ centraltongue
+ stop
+
+
+ 114
+ iaor_c
+ vowel
+ final
+ voiced
+ centraltongue
+ stop
+
+
+ 115
+ iar_c
+ vowel
+ final
+ voiced
+ fronttongue
+ affricative
+
+
+ 116
+ ier_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 117
+ ihr_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 118
+ iir_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 119
+ ingr_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 120
+ inr_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 121
+ iongr_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 122
+ iour_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 123
+ ir_c
+ vowel
+ final
+ voiced
+ backtongue
+ affricative
+
+
+ 124
+ ongr_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 125
+ or_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 126
+ our_c
+ vowel
+ final
+ voiced
+ middle
+ open
+
+
+ 127
+ uair_c
+ vowel
+ final
+ voiced
+ velar
+ fricative
+
+
+ 128
+ uangr_c
+ vowel
+ final
+ voiced
+ high
+ close
+
+
+ 129
+ uanr_c
+ vowel
+ final
+ voiced
+ high
+ close
+
+
+ 130
+ uar_c
+ vowel
+ final
+ voiced
+ velar
+ fricative
+
+
+ 131
+ ueir_c
+ vowel
+ final
+ voiced
+ high
+ close
+
+
+ 132
+ uenr_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 133
+ uor_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 134
+ ur_c
+ vowel
+ final
+ voiced
+ velar
+ stop
+
+
+ 135
+ vanr_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 136
+ ver_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 137
+ vnr_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 138
+ vr_c
+ vowel
+ final
+ voiced
+ high
+ open
+
+
+ 146
+ pau
+ consonant
+ initial
+ unvoiced
+ high
+ close
+
+
diff --git a/model/resource/PinYin/tonelist.txt b/model/resource/PinYin/tonelist.txt
new file mode 100644
index 0000000000000000000000000000000000000000..7741d23307af10cba518e3d15b5892db25b67e78
--- /dev/null
+++ b/model/resource/PinYin/tonelist.txt
@@ -0,0 +1,7 @@
+1
+
+4
+2
+3
+5
+0
diff --git a/model/voc.axmodel b/model/voc.axmodel
new file mode 100644
index 0000000000000000000000000000000000000000..511f1ec7b7806acce8fe70645d106d2b1c3f004d
--- /dev/null
+++ b/model/voc.axmodel
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:55108d50ae7b2c4c4dc40b5f7ed84156e0a61dcd7822763cb70f7f3e0317e2dc
+size 7044670
diff --git a/sdk/CMakeLists.txt b/sdk/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..ba24d790ce72b4234381a3d0f6e93acfac7efa75
--- /dev/null
+++ b/sdk/CMakeLists.txt
@@ -0,0 +1,17 @@
+cmake_minimum_required(VERSION 3.15)
+project(kantts_sdk LANGUAGES CXX)
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+
+include_directories(include ${AX_RUNTIME_ROOT}/include)
+link_directories(${AX_RUNTIME_ROOT}/lib)
+
+add_library(kantts_tts STATIC
+ src/ax_engine.cpp
+ src/kantts.cpp
+)
+target_include_directories(kantts_tts PUBLIC include)
+target_link_libraries(kantts_tts PRIVATE ax_engine ax_sys pthread)
+
+add_executable(kantts_tts_example src/main.cpp)
+target_link_libraries(kantts_tts_example PRIVATE kantts_tts ax_engine ax_sys)
diff --git a/sdk/axrt/include/ax_base_type.h b/sdk/axrt/include/ax_base_type.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d32b72f142d89e2ba72d76e445904e0345cd257
--- /dev/null
+++ b/sdk/axrt/include/ax_base_type.h
@@ -0,0 +1,41 @@
+/**************************************************************************************************
+ *
+ * Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
+ *
+ * This source file is the property of Axera Semiconductor Co., Ltd. and
+ * may not be copied or distributed in any isomorphic form without the prior
+ * written consent of Axera Semiconductor Co., Ltd.
+ *
+ **************************************************************************************************/
+
+#ifndef _AX_BASE_TYPE_H_
+#define _AX_BASE_TYPE_H_
+
+/* types of variables typedef */
+typedef unsigned long long int AX_U64;
+typedef unsigned int AX_U32;
+typedef unsigned short AX_U16;
+typedef unsigned char AX_U8;
+typedef long long int AX_S64;
+typedef int AX_S32;
+typedef short AX_S16;
+typedef signed char AX_S8;
+typedef char AX_CHAR;
+typedef long AX_LONG;
+typedef unsigned long AX_ULONG;
+typedef unsigned long AX_ADDR;
+typedef float AX_F32;
+typedef double AX_F64;
+typedef void AX_VOID;
+typedef unsigned int AX_SIZE_T;
+
+typedef enum {
+ AX_FALSE = 0,
+ AX_TRUE = 1,
+} AX_BOOL;
+
+#ifndef AX_NULL
+ #define AX_NULL 0
+#endif
+
+#endif //_AX_BASE_TYPE_H_
diff --git a/sdk/axrt/include/ax_buffer_tool.h b/sdk/axrt/include/ax_buffer_tool.h
new file mode 100644
index 0000000000000000000000000000000000000000..6978aca392c75d912dbd8777f77fda022d70a4c0
--- /dev/null
+++ b/sdk/axrt/include/ax_buffer_tool.h
@@ -0,0 +1,277 @@
+/**************************************************************************************************
+ *
+ * Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
+ *
+ * This source file is the property of Axera Semiconductor Co., Ltd. and
+ * may not be copied or distributed in any isomorphic form without the prior
+ * written consent of Axera Semiconductor Co., Ltd.
+ *
+ **************************************************************************************************/
+
+#ifndef _AX_BUFFER_TOOL_H_
+#define _AX_BUFFER_TOOL_H_
+
+#include "ax_base_type.h"
+#include "ax_global_type.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* End of #ifdef __cplusplus */
+
+#define AX_COMM_ALIGN(value, n) (((value) + (n) - 1) & ~((n) - 1))
+
+static __inline AX_U32 AX_VIN_GetImgBufferSize(AX_U32 uHeight, AX_U32 uWidth, AX_IMG_FORMAT_E eImageFormat,
+ AX_FRAME_COMPRESS_INFO_T *pstCompressInfo, AX_U32 uAlignSize)
+{
+ AX_U32 uWidthBeat = 0;
+ AX_U32 uBufSize = 0;
+ AX_U32 uPixBits = 0;
+ AX_BOOL bFormatYuv = AX_TRUE;
+
+ switch (eImageFormat) {
+ case AX_FORMAT_BAYER_RAW_8BPP:
+ uPixBits = 8;
+ break;
+ case AX_FORMAT_BAYER_RAW_10BPP:
+ uPixBits = 10;
+ break;
+ case AX_FORMAT_BAYER_RAW_12BPP:
+ uPixBits = 12;
+ break;
+ case AX_FORMAT_BAYER_RAW_14BPP:
+ uPixBits = 14;
+ break;
+ case AX_FORMAT_BAYER_RAW_16BPP:
+ uPixBits = 16;
+ break;
+ case AX_FORMAT_YUV400:
+ case AX_FORMAT_YUV420_PLANAR:
+ case AX_FORMAT_YUV420_PLANAR_VU:
+ case AX_FORMAT_YUV420_SEMIPLANAR:
+ case AX_FORMAT_YUV420_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV422_PLANAR:
+ case AX_FORMAT_YUV422_PLANAR_VU:
+ case AX_FORMAT_YUV422_SEMIPLANAR:
+ case AX_FORMAT_YUV422_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV422_INTERLEAVED_YUVY:
+ case AX_FORMAT_YUV422_INTERLEAVED_YUYV:
+ case AX_FORMAT_YUV422_INTERLEAVED_UYVY:
+ case AX_FORMAT_YUV422_INTERLEAVED_VYUY:
+ case AX_FORMAT_YUV444_PLANAR:
+ case AX_FORMAT_YUV444_PLANAR_VU:
+ case AX_FORMAT_YUV444_SEMIPLANAR:
+ case AX_FORMAT_YUV444_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV444_PACKED:
+ uPixBits = 8;
+ break;
+ case AX_FORMAT_YUV400_10BIT:
+ case AX_FORMAT_YUV420_PLANAR_10BIT_UV_PACKED_4Y5B:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P101010:
+ case AX_FORMAT_YUV444_PACKED_10BIT_P101010:
+ uPixBits = 10;
+ break;
+ case AX_FORMAT_YUV420_PLANAR_10BIT_I010:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P010:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P016:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_I016:
+ case AX_FORMAT_YUV444_PACKED_10BIT_P010:
+ uPixBits = 16;
+ break;
+ default:
+ uPixBits = 8;
+ break;
+ }
+ if (((uWidth * uPixBits) % 128) != 0) {
+ uWidthBeat = ((uWidth * uPixBits) / 128) + 1;
+ } else {
+ uWidthBeat = (uWidth * uPixBits) / 128 ;
+ }
+
+ if (uAlignSize != 0) {
+ uWidthBeat = ((uWidthBeat * 16 * uAlignSize) + uAlignSize - 1) / uAlignSize;
+ uWidthBeat = uWidthBeat / 16;
+ } else {
+ uWidthBeat = ((uWidthBeat * 16 * 128) + 127) / 128;
+ uWidthBeat = uWidthBeat / 16;
+ }
+
+ // calc dma buffer size
+ switch (eImageFormat) {
+ case AX_FORMAT_BAYER_RAW_8BPP:
+ case AX_FORMAT_BAYER_RAW_10BPP:
+ case AX_FORMAT_BAYER_RAW_12BPP:
+ case AX_FORMAT_BAYER_RAW_14BPP:
+ case AX_FORMAT_BAYER_RAW_16BPP:
+ uBufSize = uWidthBeat * 16 * uHeight;
+ bFormatYuv = AX_FALSE;
+ break;
+ case AX_FORMAT_YUV400:
+ case AX_FORMAT_YUV400_10BIT:
+ uBufSize = uWidthBeat * 16 * uHeight;
+ break;
+ case AX_FORMAT_YUV420_PLANAR:
+ case AX_FORMAT_YUV420_PLANAR_VU:
+ case AX_FORMAT_YUV420_SEMIPLANAR:
+ case AX_FORMAT_YUV420_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV420_PLANAR_10BIT_UV_PACKED_4Y5B:
+ case AX_FORMAT_YUV420_PLANAR_10BIT_I010:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P101010:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P010:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P016:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_I016:
+ uBufSize = uWidthBeat * 16 * uHeight * 3 / 2;
+ break;
+ case AX_FORMAT_YUV422_PLANAR:
+ case AX_FORMAT_YUV422_PLANAR_VU:
+ case AX_FORMAT_YUV422_SEMIPLANAR:
+ case AX_FORMAT_YUV422_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV422_INTERLEAVED_YUVY:
+ case AX_FORMAT_YUV422_INTERLEAVED_YUYV:
+ case AX_FORMAT_YUV422_INTERLEAVED_UYVY:
+ case AX_FORMAT_YUV422_INTERLEAVED_VYUY:
+ uBufSize = uWidthBeat * 16 * uHeight * 2;
+ break;
+ case AX_FORMAT_YUV444_PLANAR:
+ case AX_FORMAT_YUV444_PLANAR_VU:
+ case AX_FORMAT_YUV444_SEMIPLANAR:
+ case AX_FORMAT_YUV444_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV444_PACKED:
+ case AX_FORMAT_YUV444_PACKED_10BIT_P010:
+ case AX_FORMAT_YUV444_PACKED_10BIT_P101010:
+ uBufSize = uWidthBeat * 16 * uHeight * 3;
+ break;
+ default:
+ uBufSize = uWidthBeat * 16 * uHeight * 3 / 2;
+ break;
+ }
+
+ if (pstCompressInfo != AX_NULL) {
+ if (pstCompressInfo->enCompressMode == AX_COMPRESS_MODE_LOSSLESS) {
+ if (bFormatYuv == AX_TRUE) {
+ uBufSize += uHeight * 96; /* add the header buf for compress data */
+ } else {
+ uBufSize += uHeight * 32; /* add the header buf for compress data */
+ }
+ } else if (pstCompressInfo->enCompressMode == AX_COMPRESS_MODE_LOSSY) {
+ if (bFormatYuv == AX_TRUE) {
+ if ((0 != pstCompressInfo->u32CompressLevel) && (10 >= pstCompressInfo->u32CompressLevel)) {
+ if (8 == uPixBits) {
+ if (pstCompressInfo->u32CompressLevel <= 8) {
+ uBufSize = uBufSize * pstCompressInfo->u32CompressLevel * 0.125;
+ }
+ } else if (10 == uPixBits) {
+ uBufSize = uBufSize * pstCompressInfo->u32CompressLevel * 0.1;
+ } else {
+ //do nothing
+ }
+ }
+ }
+ } else {
+ //without fbc
+ }
+ }
+
+ return uBufSize;
+}
+
+
+static __inline AX_U32 AX_VDEC_GetPicBufferSize(AX_U32 uWidth, AX_U32 uHeight, AX_IMG_FORMAT_E eOutputFormat,
+ AX_FRAME_COMPRESS_INFO_T *pstCompressInfo, AX_U32 uAlignSize,
+ AX_PAYLOAD_TYPE_E enType)
+{
+ AX_U32 picSizeInMbs = 0;
+ AX_U32 picSize = 0;
+ AX_U32 dmvMemSize = 0;
+ AX_U32 refBuffSize = 0;
+ AX_U32 uPixBits = 8;
+ AX_U32 uBufSize = 0;
+ AX_U32 uHeightAlign = 0;
+ AX_U32 uWidthAlign = 0;
+
+
+ // picSizeInMbs = (AX_COMM_ALIGN(uHeight, 16) >> 4) * (AX_COMM_ALIGN(uWidth, 16) >> 4);
+ if ((PT_H264 == enType) || (PT_H265 == enType)) {
+ switch (eOutputFormat) {
+ case AX_FORMAT_YUV400:
+ case AX_FORMAT_YUV420_PLANAR:
+ case AX_FORMAT_YUV420_PLANAR_VU:
+ case AX_FORMAT_YUV420_SEMIPLANAR:
+ case AX_FORMAT_YUV420_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV422_PLANAR:
+ case AX_FORMAT_YUV422_PLANAR_VU:
+ case AX_FORMAT_YUV422_SEMIPLANAR:
+ case AX_FORMAT_YUV422_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV422_INTERLEAVED_YUVY:
+ case AX_FORMAT_YUV422_INTERLEAVED_YUYV:
+ case AX_FORMAT_YUV422_INTERLEAVED_UYVY:
+ case AX_FORMAT_YUV422_INTERLEAVED_VYUY:
+ case AX_FORMAT_YUV444_PLANAR:
+ case AX_FORMAT_YUV444_PLANAR_VU:
+ case AX_FORMAT_YUV444_SEMIPLANAR:
+ case AX_FORMAT_YUV444_SEMIPLANAR_VU:
+ case AX_FORMAT_YUV444_PACKED:
+ uPixBits = 8;
+ break;
+ case AX_FORMAT_YUV400_10BIT:
+ case AX_FORMAT_YUV420_PLANAR_10BIT_UV_PACKED_4Y5B:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P101010:
+ case AX_FORMAT_YUV444_PACKED_10BIT_P101010:
+ uPixBits = 10;
+ break;
+ case AX_FORMAT_YUV420_PLANAR_10BIT_I010:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P010:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P016:
+ case AX_FORMAT_YUV420_SEMIPLANAR_10BIT_I016:
+ case AX_FORMAT_YUV444_PACKED_10BIT_P010:
+ uPixBits = 16;
+ break;
+ default:
+ uPixBits = 8;
+ break;
+ }
+
+ uHeightAlign = AX_COMM_ALIGN(uHeight, 64); // TBD ...
+ uWidthAlign = AX_COMM_ALIGN(uWidth, uAlignSize);
+ picSize = (uHeightAlign * uWidthAlign * 3) >> 1; // TBD ...
+
+ /* buffer size of dpb pic = picSize + dir_mv_size + tbl_size */
+ dmvMemSize = picSizeInMbs * 64;
+ refBuffSize = picSize + dmvMemSize + 32;
+ } else if ((PT_JPEG == enType) || (PT_MJPEG == enType)) {
+ picSize = (AX_COMM_ALIGN(uHeight, 16) * AX_COMM_ALIGN(uWidth, 16) * 3) >> 1;
+ refBuffSize = picSize;
+ } else {
+ refBuffSize = -1;
+ }
+
+ if (pstCompressInfo != AX_NULL) {
+ if (pstCompressInfo->enCompressMode == AX_COMPRESS_MODE_LOSSLESS) {
+ refBuffSize = -1; // AX650 VDEC unsupport fbc lossless mode
+ } else if (pstCompressInfo->enCompressMode == AX_COMPRESS_MODE_LOSSY) {
+ if ((0 != pstCompressInfo->u32CompressLevel) && (10 >= pstCompressInfo->u32CompressLevel)) {
+ if (8 == uPixBits) {
+ if (pstCompressInfo->u32CompressLevel <= 8) {
+ uBufSize = uBufSize * pstCompressInfo->u32CompressLevel * 0.125;
+ }
+ } else if (10 == uPixBits) {
+ uBufSize = uBufSize * pstCompressInfo->u32CompressLevel * 0.1;
+ } else {
+ //do nothing
+ }
+ }
+ } else {
+ //without fbc
+ }
+ }
+
+
+ return refBuffSize;
+}
+
+
+
+#ifdef __cplusplus
+}
+#endif /* End of #ifdef __cplusplus */
+
+#endif //_AX_BUFFER_TOOL_H_
diff --git a/sdk/axrt/include/ax_engine_api.h b/sdk/axrt/include/ax_engine_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..ff25a860aa9f30d2173ac69719c6f0560fc600d2
--- /dev/null
+++ b/sdk/axrt/include/ax_engine_api.h
@@ -0,0 +1,58 @@
+/**************************************************************************************************
+ *
+ * Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
+ *
+ * This source file is the property of Axera Semiconductor Co., Ltd. and
+ * may not be copied or distributed in any isomorphic form without the prior
+ * written consent of Axera Semiconductor Co., Ltd.
+ *
+ **************************************************************************************************/
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+DLLEXPORT const AX_CHAR* AX_ENGINE_GetVersion(AX_VOID);
+
+DLLEXPORT AX_VOID AX_ENGINE_NPUReset(AX_VOID);
+
+DLLEXPORT AX_S32 AX_ENGINE_Init(AX_ENGINE_NPU_ATTR_T* pNpuAttr);
+DLLEXPORT AX_S32 AX_ENGINE_GetVNPUAttr(AX_ENGINE_NPU_ATTR_T* pNpuAttr);
+DLLEXPORT AX_S32 AX_ENGINE_Deinit(AX_VOID);
+
+DLLEXPORT AX_S32 AX_ENGINE_GetModelType(const AX_VOID* pData, AX_U32 nDataSize, AX_ENGINE_MODEL_TYPE_T* pModelType);
+
+DLLEXPORT AX_S32 AX_ENGINE_CreateHandle(AX_ENGINE_HANDLE *pHandle, const AX_VOID *pData, AX_U32 nDataSize);
+DLLEXPORT AX_S32 AX_ENGINE_CreateHandleV2(AX_ENGINE_HANDLE* pHandle, const AX_VOID* pData, AX_U32 nDataSize, AX_ENGINE_HANDLE_EXTRA_T* pExtraParam);
+DLLEXPORT AX_S32 AX_ENGINE_DestroyHandle(AX_ENGINE_HANDLE nHandle);
+
+DLLEXPORT AX_S32 AX_ENGINE_GetIOInfo(AX_ENGINE_HANDLE nHandle, AX_ENGINE_IO_INFO_T** pIO);
+DLLEXPORT AX_S32 AX_ENGINE_GetGroupIOInfoCount(AX_ENGINE_HANDLE nHandle, AX_U32* pCount);
+DLLEXPORT AX_S32 AX_ENGINE_GetGroupIOInfo(AX_ENGINE_HANDLE nHandle, AX_U32 nIndex, AX_ENGINE_IO_INFO_T** pIO);
+
+DLLEXPORT AX_S32 AX_ENGINE_GetHandleModelType(AX_ENGINE_HANDLE nHandle, AX_ENGINE_MODEL_TYPE_T* pModelType);
+
+DLLEXPORT AX_S32 AX_ENGINE_CreateContext(AX_ENGINE_HANDLE handle);
+DLLEXPORT AX_S32 AX_ENGINE_CreateContextV2(AX_ENGINE_HANDLE nHandle, AX_ENGINE_CONTEXT_T* pContext);
+
+DLLEXPORT AX_S32 AX_ENGINE_RunSync(AX_ENGINE_HANDLE handle, AX_ENGINE_IO_T* pIO);
+DLLEXPORT AX_S32 AX_ENGINE_RunSyncV2(AX_ENGINE_HANDLE handle, AX_ENGINE_CONTEXT_T context, AX_ENGINE_IO_T* pIO);
+DLLEXPORT AX_S32 AX_ENGINE_RunGroupIOSync(AX_ENGINE_HANDLE handle, AX_ENGINE_CONTEXT_T context, AX_U32 nIndex, AX_ENGINE_IO_T* pIO);
+
+DLLEXPORT AX_S32 AX_ENGINE_SetAffinity(AX_ENGINE_HANDLE nHandle, AX_ENGINE_NPU_SET_T nNpuSet);
+DLLEXPORT AX_S32 AX_ENGINE_GetAffinity(AX_ENGINE_HANDLE nHandle, AX_ENGINE_NPU_SET_T* pNpuSet);
+
+DLLEXPORT AX_S32 AX_ENGINE_GetCMMUsage(AX_ENGINE_HANDLE nHandle, AX_ENGINE_CMM_INFO* pCMMInfo);
+
+DLLEXPORT const AX_CHAR* AX_ENGINE_GetModelToolsVersion(AX_ENGINE_HANDLE nHandle);
+
+DLLEXPORT AX_S32 AX_ENGINE_GetEncModelType(const AX_VOID *pData, AX_U32 nDataSize, AX_ENGINE_CIPHER_KEY_T *pKey, AX_ENGINE_MODEL_TYPE_T *pModelType);
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/sdk/axrt/include/ax_engine_type.h b/sdk/axrt/include/ax_engine_type.h
new file mode 100644
index 0000000000000000000000000000000000000000..14e4811275c48f76ccf720573b6e45ba49e0eb30
--- /dev/null
+++ b/sdk/axrt/include/ax_engine_type.h
@@ -0,0 +1,233 @@
+/**************************************************************************************************
+ *
+ * Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
+ *
+ * This source file is the property of Axera Semiconductor Co., Ltd. and
+ * may not be copied or distributed in any isomorphic form without the prior
+ * written consent of Axera Semiconductor Co., Ltd.
+ *
+ **************************************************************************************************/
+
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined __GNUC__
+#define DLLEXPORT __attribute((visibility("default")))
+#elif defined(_MSC_VER)
+#define DLLEXPORT __declspec(dllexport)
+#else
+#define DLLEXPORT
+#endif
+
+#if defined __GNUC__
+#define DEPRECATED_BEFORE
+#define DEPRECATED_AFTER __attribute__((deprecated))
+#elif defined(_MSC_VER)
+#pragma deprecated()
+#define DEPRECATED_BEFORE __declspec(deprecated)
+#define DEPRECATED_AFTER
+#else
+#define DEPRECATED_BEFORE
+#define DEPRECATED_AFTER
+#endif
+
+#include
+
+typedef AX_U32 AX_KERNEL_HANDLE;
+typedef AX_VOID* AX_ENGINE_HANDLE;
+typedef AX_VOID* AX_ENGINE_CONTEXT_T;
+typedef AX_VOID* AX_ENGINE_EXECUTION_CONTEXT;
+typedef AX_U32 AX_ENGINE_NPU_SET_T;
+
+
+typedef enum _AX_ENGINE_TENSOR_LAYOUT_E
+{
+ AX_ENGINE_TENSOR_LAYOUT_UNKNOWN = 0,
+ AX_ENGINE_TENSOR_LAYOUT_NHWC = 1,
+ AX_ENGINE_TENSOR_LAYOUT_NCHW = 2,
+} AX_ENGINE_TENSOR_LAYOUT_T;
+
+typedef enum
+{
+ AX_ENGINE_MT_PHYSICAL = 0,
+ AX_ENGINE_MT_VIRTUAL = 1,
+ AX_ENGINE_MT_OCM = 2,
+} AX_ENGINE_MEMORY_TYPE_T;
+
+typedef enum
+{
+ AX_ENGINE_DT_UNKNOWN = 0,
+ AX_ENGINE_DT_UINT8 = 1,
+ AX_ENGINE_DT_UINT16 = 2,
+ AX_ENGINE_DT_FLOAT32 = 3,
+ AX_ENGINE_DT_SINT16 = 4,
+ AX_ENGINE_DT_SINT8 = 5,
+ AX_ENGINE_DT_SINT32 = 6,
+ AX_ENGINE_DT_UINT32 = 7,
+ AX_ENGINE_DT_FLOAT64 = 8,
+ AX_ENGINE_DT_BFLOAT16 = 9,
+ AX_ENGINE_DT_UINT10_PACKED = 100,
+ AX_ENGINE_DT_UINT12_PACKED = 101,
+ AX_ENGINE_DT_UINT14_PACKED = 102,
+ AX_ENGINE_DT_UINT16_PACKED = 103,
+} AX_ENGINE_DATA_TYPE_T;
+
+typedef enum
+{
+ AX_ENGINE_CS_FEATUREMAP = 0,
+ AX_ENGINE_CS_RAW8 = 12,
+ AX_ENGINE_CS_RAW10 = 1,
+ AX_ENGINE_CS_RAW12 = 2,
+ AX_ENGINE_CS_RAW14 = 11,
+ AX_ENGINE_CS_RAW16 = 3,
+ AX_ENGINE_CS_NV12 = 4,
+ AX_ENGINE_CS_NV21 = 5,
+ AX_ENGINE_CS_RGB = 6,
+ AX_ENGINE_CS_BGR = 7,
+ AX_ENGINE_CS_RGBA = 8,
+ AX_ENGINE_CS_GRAY = 9,
+ AX_ENGINE_CS_YUV444 = 10,
+} AX_ENGINE_COLOR_SPACE_T;
+
+typedef enum {
+ AX_ENGINE_VIRTUAL_NPU_DISABLE = 0, // virtual_npu disable
+ AX_ENGINE_VIRTUAL_NPU_STD = 1,
+ AX_ENGINE_VIRTUAL_NPU_BIG_LITTLE = 2,
+ AX_ENGINE_VIRTUAL_NPU_LITTLE_BIG = 3,
+ AX_ENGINE_VIRTUAL_NPU_BUTT = 4,
+} AX_ENGINE_NPU_MODE_T;
+
+typedef enum {
+ AX_ENGINE_MODEL_TYPE0 = 0,
+ AX_ENGINE_MODEL_TYPE1 = 1,
+ AX_ENGINE_MODEL_TYPE2 = 2,
+ AX_ENGINE_MODEL_TYPE_BUTT = 3,
+} AX_ENGINE_MODEL_TYPE_T;
+
+typedef struct {
+ AX_ENGINE_NPU_MODE_T eHardMode;
+ AX_U32 reserve[8];
+} AX_ENGINE_NPU_ATTR_T;
+
+typedef struct _AX_ENGINE_IOMETA_EX_T
+{
+ AX_ENGINE_COLOR_SPACE_T eColorSpace;
+ AX_U64 u64Reserved[18];
+} AX_ENGINE_IOMETA_EX_T;
+
+typedef struct _AX_ENGINE_IOMETA_T
+{
+ AX_CHAR *pName;
+ AX_S32 *pShape; // YUV will be treated as 1-ch data
+ AX_U8 nShapeSize; // dimension of shape
+ AX_ENGINE_TENSOR_LAYOUT_T eLayout;
+ AX_ENGINE_MEMORY_TYPE_T eMemoryType;
+ AX_ENGINE_DATA_TYPE_T eDataType;
+ AX_ENGINE_IOMETA_EX_T* pExtraMeta;
+ AX_U32 nSize;
+ /*!
+ * `nQuantizationValue` is the total amount of possible values
+ * in quantization part of a data represented in `Q` method
+ * eg. for U4Q12 data, nQuantizationValue = 2**12 = 4096
+ */
+ AX_U32 nQuantizationValue;
+ /*!
+ * when pStride is NULL, there is not stride limit
+ *
+ * when pStride is not NULL, it holds the number of elements in stride
+ * of each dimension, the size of `pStride` always equal to `nShapeSize`
+ * eg. index[0:3] shape[n,c,h,w] stride[chw,hw,w,1]
+ * eg. index[0:3] shape[n,h,w,c] stride[hwc,wc,c,1]
+ */
+ AX_S32 *pStride;
+#if defined(__aarch64__) || defined(__x86_64__)
+ AX_U64 u64Reserved[9];
+#elif defined(__arm__)
+ AX_U64 u64Reserved[11];
+#endif
+} AX_ENGINE_IOMETA_T;
+
+typedef struct _AX_ENGINE_IO_INFO_T
+{
+ AX_ENGINE_IOMETA_T *pInputs;
+ AX_U32 nInputSize;
+ AX_ENGINE_IOMETA_T *pOutputs;
+ AX_U32 nOutputSize;
+ AX_U32 nMaxBatchSize; // 0 for unlimited
+ AX_BOOL bDynamicBatchSize; // if true, any batch size <= nMaxBatchSize is supported
+#if defined(__aarch64__) || defined(__x86_64__)
+ AX_U64 u64Reserved[11];
+#elif defined(__arm__)
+ AX_U64 u64Reserved[13];
+#endif
+} AX_ENGINE_IO_INFO_T;
+
+typedef struct _AX_ENGINE_IO_BUFFER_T
+{
+ AX_U64 phyAddr;
+ AX_VOID *pVirAddr;
+ AX_U32 nSize; // total size of memory
+ /*!
+ * pStride holds the bytes of each dimension
+ * set pStride to NULL to disable stride function
+ *
+ * `nStrideSize` should be equal to `nShapeSize`
+ * eg. index[0:3] shape[n,c,h,w] stride[chw,hw,w,1]
+ * eg. index[0:3] shape[n,h,w,c] stride[hwc,wc,c,1]
+ */
+ AX_S32 *pStride;
+ AX_U8 nStrideSize;
+#if defined(__aarch64__) || defined(__x86_64__)
+ AX_U64 u64Reserved[11];
+#elif defined(__arm__)
+ AX_U64 u64Reserved[13];
+#endif
+} AX_ENGINE_IO_BUFFER_T;
+
+typedef struct _AX_ENGINE_IO_SETTING_T
+{
+ AX_U32 nWbtIndex;
+ AX_U64 u64Reserved[7];
+}AX_ENGINE_IO_SETTING_T;
+
+typedef struct _AX_ENGINE_IO_T
+{
+ AX_ENGINE_IO_BUFFER_T *pInputs;
+ AX_U32 nInputSize;
+ AX_ENGINE_IO_BUFFER_T *pOutputs;
+ AX_U32 nOutputSize;
+ AX_U32 nBatchSize; // 0 for auto detection
+ AX_ENGINE_IO_SETTING_T *pIoSetting;
+ AX_U32 nParallelRun; // 0 disable parallel run
+#if defined(__aarch64__) || defined(__x86_64__)
+ AX_U64 u64Reserved[10];
+#elif defined(__arm__)
+ AX_U64 u64Reserved[12];
+#endif
+} AX_ENGINE_IO_T;
+
+typedef struct {
+ AX_ENGINE_NPU_SET_T nNpuSet;
+ AX_S8 *pName;
+ AX_VOID *pKey;
+ AX_U32 reserve[6];
+} AX_ENGINE_HANDLE_EXTRA_T;
+
+typedef struct _AX_ENGINE_CMM_INFO
+{
+ AX_U32 nCMMSize;
+} AX_ENGINE_CMM_INFO;
+
+typedef struct {
+ AX_U8 *pPek;
+ AX_U32 nPekSize;
+ AX_U8 *pAdk;
+ AX_U32 nAdkSize;
+} AX_ENGINE_CIPHER_KEY_T;
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/sdk/axrt/include/ax_global_type.h b/sdk/axrt/include/ax_global_type.h
new file mode 100644
index 0000000000000000000000000000000000000000..98b68cbe290469ca5521182b7255ab1ebf6031de
--- /dev/null
+++ b/sdk/axrt/include/ax_global_type.h
@@ -0,0 +1,476 @@
+/**************************************************************************************************
+ *
+ * Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
+ *
+ * This source file is the property of Axera Semiconductor Co., Ltd. and
+ * may not be copied or distributed in any isomorphic form without the prior
+ * written consent of Axera Semiconductor Co., Ltd.
+ *
+ **************************************************************************************************/
+
+#ifndef _AX_GLOBAL_TYPE_H_
+#define _AX_GLOBAL_TYPE_H_
+#include "ax_base_type.h"
+
+#define DEF_ALL_MOD_GRP_MAX (164)
+#define DEF_ALL_MOD_CHN_MAX (128)
+#define AX_LINK_DEST_MAXNUM (4)
+#define AX_MAX_COLOR_COMPONENT (3) /* VENC support Y/U/V three planes come from external input */
+#define AX_MAX_COMPRESS_LOSSY_LEVEL (10)
+#define AX_INVALID_ID (-1U)
+
+#ifndef AX_SUCCESS
+#define AX_SUCCESS (0)
+#endif
+
+/* don't change this */
+typedef enum {
+ SYS_LOG_MIN = -1,
+ SYS_LOG_EMERGENCY = 0,
+ SYS_LOG_ALERT = 1,
+ SYS_LOG_CRITICAL = 2,
+ SYS_LOG_ERROR = 3,
+ SYS_LOG_WARN = 4,
+ SYS_LOG_NOTICE = 5,
+ SYS_LOG_INFO = 6,
+ SYS_LOG_DEBUG = 7,
+ SYS_LOG_MAX
+} AX_LOG_LEVEL_E;
+
+typedef enum {
+ SYS_LOG_TARGET_MIN = 0,
+ SYS_LOG_TARGET_STDERR = 1,
+ SYS_LOG_TARGET_SYSLOG = 2,
+ SYS_LOG_TARGET_NULL = 3,
+ SYS_LOG_TARGET_MAX
+} AX_LOG_TARGET_E;
+
+
+typedef enum
+{
+ PT_PCMU = 0,
+ PT_1016 = 1,
+ PT_G721 = 2,
+ PT_GSM = 3,
+ PT_G723 = 4,
+ PT_DVI4_8K = 5,
+ PT_DVI4_16K = 6,
+ PT_LPC = 7,
+ PT_PCMA = 8,
+ PT_G722 = 9,
+ PT_S16BE_STEREO = 10,
+ PT_S16BE_MONO = 11,
+ PT_QCELP = 12,
+ PT_CN = 13,
+ PT_MPEGAUDIO = 14,
+ PT_G728 = 15,
+ PT_DVI4_3 = 16,
+ PT_DVI4_4 = 17,
+ PT_G729 = 18,
+ PT_G711A = 19,
+ PT_G711U = 20,
+ PT_G726 = 21,
+ PT_G729A = 22,
+ PT_LPCM = 23,
+ PT_CelB = 25,
+ PT_JPEG = 26,
+ PT_CUSM = 27,
+ PT_NV = 28,
+ PT_PICW = 29,
+ PT_CPV = 30,
+ PT_H261 = 31,
+ PT_MPEGVIDEO = 32,
+ PT_MPEG2TS = 33,
+ PT_H263 = 34,
+ PT_SPEG = 35,
+ PT_MPEG2VIDEO = 36,
+ PT_AAC = 37,
+ PT_WMA9STD = 38,
+ PT_HEAAC = 39,
+ PT_PCM_VOICE = 40,
+ PT_PCM_AUDIO = 41,
+ PT_AACLC = 42,
+ PT_MP3 = 43,
+ PT_ADPCMA = 49,
+ PT_AEC = 50,
+ PT_X_LD = 95,
+ PT_H264 = 96,
+ PT_D_GSM_HR = 200,
+ PT_D_GSM_EFR = 201,
+ PT_D_L8 = 202,
+ PT_D_RED = 203,
+ PT_D_VDVI = 204,
+ PT_D_BT656 = 220,
+ PT_D_H263_1998 = 221,
+ PT_D_MP1S = 222,
+ PT_D_MP2P = 223,
+ PT_D_BMPEG = 224,
+ PT_MP4VIDEO = 230,
+ PT_MP4AUDIO = 237,
+ PT_VC1 = 238,
+ PT_JVC_ASF = 255,
+ PT_D_AVI = 256,
+ PT_DIVX3 = 257,
+ PT_AVS = 258,
+ PT_REAL8 = 259,
+ PT_REAL9 = 260,
+ PT_VP6 = 261,
+ PT_VP6F = 262,
+ PT_VP6A = 263,
+ PT_SORENSON = 264,
+ PT_H265 = 265,
+ PT_VP8 = 266,
+ PT_MVC = 267,
+ PT_PNG = 268,
+ PT_AVS2 = 269,
+ PT_VP7 = 270,
+ PT_VP9 = 271,
+ PT_AMR = 1001,
+ PT_MJPEG = 1002,
+ PT_AMRWB = 1003,
+ PT_PRORES = 1006,
+ PT_OPUS = 1007,
+ PT_BUTT
+} AX_PAYLOAD_TYPE_E;
+
+typedef enum {
+ AX_VSCAN_FORMAT_RASTER = 0, /* video raster scan mode */
+ AX_VSCAN_FORMAT_BUTT
+} AX_VSCAN_FORMAT_E;
+
+typedef enum
+{
+ AX_COMPRESS_MODE_NONE = 0, /* no compress */
+ AX_COMPRESS_MODE_LOSSLESS,
+ AX_COMPRESS_MODE_LOSSY,
+ AX_COMPRESS_MODE_BUTT
+} AX_COMPRESS_MODE_E;
+
+typedef struct axFRAME_COMPRESS_INFO_T {
+ AX_COMPRESS_MODE_E enCompressMode;
+ AX_U32 u32CompressLevel;
+} AX_FRAME_COMPRESS_INFO_T;
+
+typedef enum axDYNAMIC_RANGE_E
+{
+ AX_DYNAMIC_RANGE_SDR8 = 0,
+ AX_DYNAMIC_RANGE_SDR10,
+ AX_DYNAMIC_RANGE_HDR10,
+ AX_DYNAMIC_RANGE_HLG,
+ AX_DYNAMIC_RANGE_SLF,
+ AX_DYNAMIC_RANGE_XDR,
+ AX_DYNAMIC_RANGE_BUTT
+} AX_DYNAMIC_RANGE_E;
+
+typedef enum axCOLOR_GAMUT_E
+{
+ AX_COLOR_GAMUT_BT601 = 0,
+ AX_COLOR_GAMUT_BT709,
+ AX_COLOR_GAMUT_BT2020,
+ AX_COLOR_GAMUT_USER,
+ AX_COLOR_GAMUT_BUTT
+} AX_COLOR_GAMUT_E;
+
+typedef enum
+{
+ AX_FORMAT_INVALID = -1,
+
+ /* YUV400 8 bit */
+ AX_FORMAT_YUV400 = 0x0, /* Y... */
+
+ /* YUV420 8 bit */
+ AX_FORMAT_YUV420_PLANAR = 0x1, /* YYYY... UUUU... VVVV... I420/YU12 */
+ AX_FORMAT_YUV420_PLANAR_VU = 0x2, /* YYYY... VVVV... UUUU... YV12 */
+ AX_FORMAT_YUV420_SEMIPLANAR = 0x3, /* YYYY... UVUVUV... NV12 */
+ AX_FORMAT_YUV420_SEMIPLANAR_VU = 0x4, /* YYYY... VUVUVU... NV21 */
+
+ /* YUV422 8 bit */
+ AX_FORMAT_YUV422_PLANAR = 0x8, /* YYYY... UUUU... VVVV... I422 */
+ AX_FORMAT_YUV422_PLANAR_VU = 0x9, /* YYYY... VVVV... UUUU... YV16 */
+ AX_FORMAT_YUV422_SEMIPLANAR = 0xA, /* YYYY... UVUVUV... NV61 */
+ AX_FORMAT_YUV422_SEMIPLANAR_VU = 0xB, /* YYYY... VUVUVU... NV16 */
+ AX_FORMAT_YUV422_INTERLEAVED_YUVY = 0xC, /* YUVYYUVY... YUVY */
+ AX_FORMAT_YUV422_INTERLEAVED_YUYV = 0xD, /* YUYVYUYV... YUYV */
+ AX_FORMAT_YUV422_INTERLEAVED_UYVY = 0xE, /* UYVYUYVY... UYVY */
+ AX_FORMAT_YUV422_INTERLEAVED_VYUY = 0xF, /* VYUYVYUY... VYUY */
+ AX_FORMAT_YUV422_INTERLEAVED_YVYU = 0x10, /* VYUYVYUY... YVYU */
+
+ /* YUV444 8 bit */
+ AX_FORMAT_YUV444_PLANAR = 0x14, /* YYYY... UUUU... VVVV... I444 */
+ AX_FORMAT_YUV444_PLANAR_VU = 0x15, /* YYYY... VVVV... UUUU... YV24 */
+ AX_FORMAT_YUV444_SEMIPLANAR = 0x16, /* YYYY... UVUVUV... NV24 */
+ AX_FORMAT_YUV444_SEMIPLANAR_VU = 0x17, /* YYYY... VUVUVU... NV42 */
+ AX_FORMAT_YUV444_PACKED = 0x18, /* YUV YUV YUV ... */
+
+ /* YUV 10 bit */
+ AX_FORMAT_YUV400_10BIT = 0x20,
+ AX_FORMAT_YUV420_PLANAR_10BIT_UV_PACKED_4Y5B = 0x24, /* YYYY... UUUU... VVVV... , 4 Y pixels in 5 bytes, UV packed */
+ AX_FORMAT_YUV420_PLANAR_10BIT_I010 = 0x25, /* 16 bit pixel, low 10bits valid, high 6 bits invalid */
+ AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P101010 = 0x28, /* YYYY... UVUVUV... , Y/U/V 4 pixels in 5 bytes */
+ AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P010 = 0x2A, /* 16 bit pixel, high 10bits valid, low 6 bits invalid */
+ AX_FORMAT_YUV420_SEMIPLANAR_10BIT_P016 = 0x2C, /* 16 bit pixel, low 10bits valid, high 6 bits invalid */
+ AX_FORMAT_YUV420_SEMIPLANAR_10BIT_I016 = 0x2E, /* 16 bit pixel, high 10bits valid, low 6 bits invalid */
+ AX_FORMAT_YUV420_SEMIPLANAR_10BIT_12P16B = 0x2F, /* 12 pixels in 16bytes, low 120bits valid, high 8 bits invalid */
+ AX_FORMAT_YUV444_PACKED_10BIT_P010 = 0x30, /* YUV YUV YUV ... , 16 bit pixel, high 10bits valid, low 6 bits invalid */
+ AX_FORMAT_YUV444_PACKED_10BIT_P101010 = 0x32, /* YUV YUV YUV ... , 4 pixels storage in 5 bytes */
+
+ /* BAYER RAW */
+ AX_FORMAT_BAYER_RAW_8BPP = 0x80,
+ AX_FORMAT_BAYER_RAW_10BPP = 0x81,
+ AX_FORMAT_BAYER_RAW_12BPP = 0x82,
+ AX_FORMAT_BAYER_RAW_14BPP = 0x83,
+ AX_FORMAT_BAYER_RAW_16BPP = 0x84,
+
+ /* RGB Format */
+ AX_FORMAT_RGB565 = 0xA0,
+ AX_FORMAT_RGB888 = 0xA1, /* RGB888 24bpp */
+ AX_FORMAT_KRGB444 = 0xA2, /* RGB444 16bpp */
+ AX_FORMAT_KRGB555 = 0xA3, /* RGB555 16bpp */
+ AX_FORMAT_KRGB888 = 0xA4, /* RGB888 32bpp */
+ AX_FORMAT_BGR888 = 0xA5,
+ AX_FORMAT_BGR565 = 0xA6,
+
+ AX_FORMAT_ARGB4444 = 0xC5, /* ARGB4444 */
+ AX_FORMAT_ARGB1555 = 0xC6, /* ARGB1555 */
+ AX_FORMAT_ARGB8888 = 0xC7, /* ARGB8888 */
+ AX_FORMAT_ARGB8565 = 0xC8, /* ARGB8565 */
+ AX_FORMAT_RGBA8888 = 0xC9,
+ AX_FORMAT_RGBA5551 = 0xCA,
+ AX_FORMAT_RGBA4444 = 0xCB,
+
+ AX_FORMAT_BITMAP = 0xD0,
+
+ AX_FORMAT_MAX
+} AX_IMG_FORMAT_E;
+
+
+typedef struct axVIDEO_FRAME_T {
+ AX_U32 u32Width;
+ AX_U32 u32Height;
+ AX_IMG_FORMAT_E enImgFormat;
+ AX_VSCAN_FORMAT_E enVscanFormat;
+ AX_FRAME_COMPRESS_INFO_T stCompressInfo;
+ AX_DYNAMIC_RANGE_E stDynamicRange;
+ AX_COLOR_GAMUT_E stColorGamut;
+
+ AX_U32 u32PicStride[AX_MAX_COLOR_COMPONENT];
+ AX_U32 u32ExtStride[AX_MAX_COLOR_COMPONENT];
+
+ AX_U64 u64PhyAddr[AX_MAX_COLOR_COMPONENT]; /* frame physics address*/
+ AX_U64 u64VirAddr[AX_MAX_COLOR_COMPONENT]; /* frame virtual address*/
+ AX_U64 u64ExtPhyAddr[AX_MAX_COLOR_COMPONENT];
+ AX_U64 u64ExtVirAddr[AX_MAX_COLOR_COMPONENT];
+ AX_U32 u32HeaderSize[AX_MAX_COLOR_COMPONENT]; /* frame header size*/
+ AX_U32 u32BlkId[AX_MAX_COLOR_COMPONENT];
+
+ AX_S16 s16CropX;
+ AX_S16 s16CropY;
+ AX_S16 s16CropWidth;
+ AX_S16 s16CropHeight;
+
+ AX_U32 u32TimeRef;
+ AX_U64 u64PTS; /* Payload TimeStamp */
+ AX_U64 u64SeqNum; /* input frame sequence number */
+ AX_U64 u64UserData; /* Reserved for user, sdk do not use */
+
+ AX_U64 u64PrivateData; /* SDK reserved, user do not use */
+ AX_U32 u32FrameFlag; /* FRAME_FLAG_E, can be OR operation. */
+
+ AX_U32 u32FrameSize; /* FRAME Size, for isp raw and yuv. */
+} AX_VIDEO_FRAME_T;
+
+typedef enum
+{
+ AX_ID_MIN = 0x00,
+ AX_ID_ISP = 0x01,
+ AX_ID_CE = 0x02,
+ AX_ID_VO = 0x03,
+ AX_ID_VDSP = 0x04,
+ AX_ID_EFUSE = 0x05,
+ AX_ID_NPU = 0x06,
+ AX_ID_VENC = 0x07,
+ AX_ID_VDEC = 0x08,
+ AX_ID_JENC = 0x09,
+ AX_ID_JDEC = 0x0a,
+ AX_ID_SYS = 0x0b,
+ AX_ID_AENC = 0x0c,
+ AX_ID_IVPS = 0x0d,
+ AX_ID_MIPI = 0x0e,
+ AX_ID_ADEC = 0x0f,
+ AX_ID_DMA = 0x10,
+ AX_ID_VIN = 0x11,
+ AX_ID_USER = 0x12,
+ AX_ID_IVES = 0x13,
+ AX_ID_SKEL = 0x14,
+ AX_ID_IVE = 0x15,
+ AX_ID_3A = 0X19,
+ AX_ID_AI = 0X20,
+ AX_ID_AO = 0X21,
+ /* reserve */
+ AX_ID_RESERVE = 0x22,
+ AX_ID_BUTT,
+} AX_MOD_ID_E;
+
+typedef enum
+{
+ AX_UNLINK_MODE = 0,
+ AX_LINK_MODE = 1,
+} AX_LINK_MODE_E;
+
+typedef enum axAUDIO_BIT_WIDTH_E {
+ AX_AUDIO_BIT_WIDTH_8 = 0, /* 8bit width */
+ AX_AUDIO_BIT_WIDTH_16 = 1, /* 16bit width*/
+ AX_AUDIO_BIT_WIDTH_24 = 2, /* 24bit width*/
+ AX_AUDIO_BIT_WIDTH_32 = 3, /* 32bit width*/
+ AX_AUDIO_BIT_WIDTH_BUTT,
+} AX_AUDIO_BIT_WIDTH_E;
+
+typedef enum axAUDIO_SOUND_MODE_E {
+ AX_AUDIO_SOUND_MODE_MONO = 0, /*mono*/
+ AX_AUDIO_SOUND_MODE_STEREO = 1, /*stereo*/
+ AX_AUDIO_SOUND_MODE_BUTT
+} AX_AUDIO_SOUND_MODE_E;
+
+typedef struct axAUDIO_FRAME_T {
+ AX_AUDIO_BIT_WIDTH_E enBitwidth; /*audio frame bitwidth*/
+ AX_AUDIO_SOUND_MODE_E enSoundmode; /*audio frame momo or stereo mode*/
+ AX_U8 *u64VirAddr;
+ AX_U64 u64PhyAddr;
+ AX_U64 u64TimeStamp; /*audio frame timestamp*/
+ AX_U32 u32Seq; /*audio frame seq*/
+ AX_U32 u32Len; /*data lenth in frame*/
+ AX_U32 u32PoolId[2];
+ AX_BOOL bEof;
+ AX_U32 u32BlkId;
+} AX_AUDIO_FRAME_T;
+
+typedef struct axAUDIO_FRAME_INFO_T {
+ AX_AUDIO_FRAME_T stAFrame;
+ AX_MOD_ID_E enModId;
+ AX_BOOL bEndOfStream;
+} AX_AUDIO_FRAME_INFO_T;
+
+typedef struct axVIDEO_FRAME_INFO_T {
+ AX_VIDEO_FRAME_T stVFrame;
+ AX_MOD_ID_E enModId;
+ AX_BOOL bEndOfStream;
+} AX_VIDEO_FRAME_INFO_T;
+
+
+typedef enum {
+ AX_NOTIFY_EVENT_SLEEP = 0,
+ AX_NOTIFY_EVENT_WAKEUP = 1,
+ AX_NOTIFY_EVENT_MAX
+} AX_NOTIFY_EVENT_E;
+
+typedef enum {
+ AX_SYS_CLK_HIGH_MODE = 0,
+ AX_SYS_CLK_HIGH_HOTBALANCE_MODE = 1,
+ AX_SYS_CLK_MID_MODE = 2,
+ AX_SYS_CLK_MID_HOTBALANCE_MODE = 3,
+ AX_SYS_CLK_MAX_MODE = 4,
+} AX_SYS_CLK_LEVEL_E;
+
+typedef enum {
+ AX_CPU_CLK_ID = 0,
+ AX_BUS_CLK_ID = 1,
+ AX_NPU_CLK_ID = 2,
+ AX_ISP_CLK_ID = 3,
+ AX_MM_CLK_ID = 4,
+ AX_VPU_CLK_ID = 5,
+ AX_SYS_CLK_MAX_ID = 6,
+} AX_SYS_CLK_ID_E;
+
+typedef struct axMOD_INFO_T {
+ AX_MOD_ID_E enModId;
+ AX_S32 s32GrpId;
+ AX_S32 s32ChnId;
+} AX_MOD_INFO_T;
+
+typedef struct axLINK_DEST_S{
+ AX_U32 u32DestNum;
+ AX_MOD_INFO_T astDestMod[AX_LINK_DEST_MAXNUM];
+} AX_LINK_DEST_T;
+
+
+typedef enum {
+ AX_MEMORY_SOURCE_CMM = 0,
+ AX_MEMORY_SOURCE_POOL = 1,
+ AX_MEMORY_SOURCE_OS = 2,
+ AX_MEMORY_SOURCE_BUTT,
+} AX_MEMORY_SOURCE_E;
+
+typedef struct {
+ AX_U64 u64PhyAddr;
+ AX_VOID *pVirAddr;
+} AX_MEMORY_ADDR_T;
+
+/* OSD attribute extend */
+typedef struct axOSD_BMP_ATTR_T {
+ AX_U16 u16Alpha;
+ AX_IMG_FORMAT_E enRgbFormat;
+
+ AX_U8 *pBitmap; /* pointer to OSD template */
+ AX_U64 u64PhyAddr; /* physical address of OSD template */
+ AX_U32 u32BmpWidth; /* template width */
+ AX_U32 u32BmpHeight; /* template height */
+
+ AX_U32 u32DstXoffset; /* where to overlay, x0 */
+ AX_U32 u32DstYoffset; /* where to overlay, y0 */
+
+ /* the below variables are only for bitmap-1 format */
+ AX_U32 u32Color; /* RW; range: [0, 0xffffff]; color RGB888; 0xRRGGBB */
+ AX_BOOL bColorInv; /* RW; range: [0, 1]; whether use background color or not */
+ AX_U32 u32ColorInv; /* RW; range: [0, 0xffffff]; inverse color RGB888; 0xRRGGBB */
+ AX_U32 u32ColorInvThr; /* RW; range: [0, 0xffffff]; threshold of color difference with background; 0xRRGGBB */
+} AX_OSD_BMP_ATTR_T;
+
+
+typedef enum {
+ AX_ERR_INVALID_MODID = 0x01, /* invalid module id */
+ AX_ERR_INVALID_DEVID = 0x02, /* invalid device id */
+ AX_ERR_INVALID_GRPID = 0x03, /* invalid group id */
+ AX_ERR_INVALID_CHNID = 0x04, /* invalid channel id */
+ AX_ERR_INVALID_PIPEID = 0x05, /* invalid pipe id */
+ AX_ERR_INVALID_STITCHGRPID = 0x06, /* invalid stitch group id */
+ /*reserved*/
+ AX_ERR_ILLEGAL_PARAM = 0x0A, /* at lease one input value is out of range */
+ AX_ERR_NULL_PTR = 0x0B, /* at lease one input pointer is null */
+ AX_ERR_BAD_ADDR = 0x0C, /* at lease one input address is invalid */
+ /*reserved*/
+ AX_ERR_SYS_NOTREADY = 0x10, /* a driver is required but not loaded */
+ AX_ERR_BUSY = 0x11, /* a resource is busy, probably locked by other users */
+ AX_ERR_NOT_INIT = 0x12, /* module is not initialized */
+ AX_ERR_NOT_CONFIG = 0x13, /* module is not configured */
+ AX_ERR_NOT_SUPPORT = 0x14, /* requested function is not supported on this platform */
+ AX_ERR_NOT_PERM = 0x15, /* requested operation is not permitted in this state */
+ AX_ERR_EXIST = 0x16, /* target object already exists */
+ AX_ERR_UNEXIST = 0x17, /* target object does not exist */
+ AX_ERR_NOMEM = 0x18, /* failed to allocate memory from heap */
+ AX_ERR_NOBUF = 0x19, /* failed to borrow buffer from pool */
+ AX_ERR_NOT_MATCH = 0x1A, /* inconsistent parameter configuration between interfaces */
+ /*reserved*/
+ AX_ERR_BUF_EMPTY = 0x20, /* buffer contains no data */
+ AX_ERR_BUF_FULL = 0x21, /* buffer contains fresh data */
+ AX_ERR_QUEUE_EMPTY = 0x22, /* failed to read as queue is empty */
+ AX_ERR_QUEUE_FULL = 0x23, /* failed to write as queue is full */
+ /*reserved*/
+ AX_ERR_TIMED_OUT = 0x27, /* operation timeout */
+ AX_ERR_FLOW_END = 0x28, /* END signal detected in data stream, processing terminated */
+ AX_ERR_UNKNOWN = 0x29, /* unexpected failure, please contact manufacturer support */
+ /*reserved*/
+
+ AX_ERR_BUTT = 0x7F, /* maxium code, private error code of all modules
+ ** must be greater than it */
+} AX_ERR_CODE_E;
+
+/******************************************************************************
+|----------------------------------------------------------------|
+|| FIXED | MOD_ID | SUB_MODULE_ID | ERR_ID |
+|----------------------------------------------------------------|
+|<--8bits----><----8bits---><-----8bits---><------8bits------->|
+******************************************************************************/
+#define AX_DEF_ERR( module, sub_module, errid) \
+ ((AX_S32)( (0x80000000L) | ((module) << 16 ) | ((sub_module)<<8) | (errid) ))
+
+#endif //_AX_GLOBAL_TYPE_H_
diff --git a/sdk/axrt/include/ax_pool_type.h b/sdk/axrt/include/ax_pool_type.h
new file mode 100644
index 0000000000000000000000000000000000000000..5a6eb17c53069acc4eed7e07e243a587fb6c19ca
--- /dev/null
+++ b/sdk/axrt/include/ax_pool_type.h
@@ -0,0 +1,70 @@
+/**************************************************************************************************
+ *
+ * Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
+ *
+ * This source file is the property of Axera Semiconductor Co., Ltd. and
+ * may not be copied or distributed in any isomorphic form without the prior
+ * written consent of Axera Semiconductor Co., Ltd.
+ *
+ **************************************************************************************************/
+
+#ifndef _AX_POOL_TYPE_H_
+#define _AX_POOL_TYPE_H_
+#include "ax_global_type.h"
+#include "ax_base_type.h"
+
+#define AX_INVALID_POOLID (-1U)
+#define AX_INVALID_BLOCKID (0)
+
+#define AX_MAX_POOLS 1024
+#define AX_MAX_COMM_POOLS 64
+#define AX_MAX_BLKS_PER_POOL 1024
+
+#define AX_MAX_PARTITION_NAME_LEN 32
+#define AX_MAX_PARTITION_COUNT 16
+
+/* error code define */
+#define AX_ERR_POOL_ILLEGAL_PARAM AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_ILLEGAL_PARAM) //0x800B010A
+#define AX_ERR_POOL_NULL_PTR AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_NULL_PTR) //0x800B010B
+#define AX_ERR_POOL_NOTREADY AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_SYS_NOTREADY) //0x800B0110
+#define AX_ERR_POOL_BUSY AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_BUSY) //0x800B0111
+#define AX_ERR_POOL_NOT_SUPPORT AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_NOT_SUPPORT) //0x800B0114
+#define AX_ERR_POOL_NOT_PERM AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_NOT_PERM) //0x800B0115
+#define AX_ERR_POOL_UNEXIST AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_UNEXIST) //0x800B0117
+#define AX_ERR_POOL_NOMEM AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_NOMEM) //0x800B0118
+#define AX_ERR_POOL_UNKNOWN AX_DEF_ERR(AX_ID_SYS, 0x01, AX_ERR_UNKNOWN) //0x800B0129
+#define AX_ERR_POOL_MMAP_FAIL AX_DEF_ERR(AX_ID_SYS, 0x01, 0x80) //0x800B0180
+#define AX_ERR_POOL_MUNMAP_FAIL AX_DEF_ERR(AX_ID_SYS, 0x01, 0x81) //0x800B0181
+#define AX_ERR_POOL_BLKFREE_FAIL AX_DEF_ERR(AX_ID_SYS, 0x01, 0x82) //0x800B0182
+
+
+typedef AX_U32 AX_POOL;
+typedef AX_U32 AX_BLK;
+
+typedef enum {
+ POOL_CACHE_MODE_NONCACHE = 0,
+ POOL_CACHE_MODE_CACHED = 1,
+ POOL_CACHE_MODE_BUTT
+} AX_POOL_CACHE_MODE_E;
+
+typedef enum {
+ POOL_SOURCE_COMMON = 0,
+ POOL_SOURCE_PRIVATE = 1,
+ POOL_SOURCE_USER = 2,
+ POOL_SOURCE_BUTT
+} AX_POOL_SOURCE_E;
+
+typedef struct {
+ AX_U64 MetaSize;
+ AX_U64 BlkSize;
+ AX_U32 BlkCnt; /* range:(0,256] */
+ AX_BOOL IsMergeMode; /* logically merged with common pool, make common pool bigger*/
+ AX_POOL_CACHE_MODE_E CacheMode;
+ AX_S8 PartitionName[AX_MAX_PARTITION_NAME_LEN];
+} AX_POOL_CONFIG_T;
+
+typedef struct {
+ AX_POOL_CONFIG_T CommPool[AX_MAX_COMM_POOLS];
+} AX_POOL_FLOORPLAN_T;
+
+#endif //_AX_POOL_TYPE_H_
diff --git a/sdk/axrt/include/ax_sys_api.h b/sdk/axrt/include/ax_sys_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..36a9d1661797b4630ef1ceefc69801824cb5ce6c
--- /dev/null
+++ b/sdk/axrt/include/ax_sys_api.h
@@ -0,0 +1,126 @@
+/**************************************************************************************************
+ *
+ * Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
+ *
+ * This source file is the property of Axera Semiconductor Co., Ltd. and
+ * may not be copied or distributed in any isomorphic form without the prior
+ * written consent of Axera Semiconductor Co., Ltd.
+ *
+ **************************************************************************************************/
+
+#ifndef _AX_SYS_API_
+#define _AX_SYS_API_
+#include "ax_global_type.h"
+#include "ax_base_type.h"
+#include "ax_pool_type.h"
+
+/* flags */
+#define AX_MEM_CACHED (1 << 1) /* alloc mem is cached */
+#define AX_MEM_NONCACHED (1 << 2) /* alloc mem is not cached */
+
+typedef struct {
+ AX_U64 PhysAddr;
+ AX_U32 SizeKB;
+ AX_S8 Name[AX_MAX_PARTITION_NAME_LEN];
+} AX_PARTITION_INFO_T;
+
+typedef struct {
+ AX_U32 PartitionCnt;/* range:1~AX_MAX_PARTITION_COUNT */
+ AX_PARTITION_INFO_T PartitionInfo[AX_MAX_PARTITION_COUNT];
+} AX_CMM_PARTITION_INFO_T;
+
+/* error code define */
+#define AX_ERR_CMM_ILLEGAL_PARAM AX_DEF_ERR(AX_ID_SYS, 0x00, AX_ERR_ILLEGAL_PARAM) //0x800B000A
+#define AX_ERR_CMM_NULL_PTR AX_DEF_ERR(AX_ID_SYS, 0x00, AX_ERR_NULL_PTR) //0x800B000B
+#define AX_ERR_CMM_NOTREADY AX_DEF_ERR(AX_ID_SYS, 0x00, AX_ERR_SYS_NOTREADY) //0x800B0010
+#define AX_ERR_CMM_NOMEM AX_DEF_ERR(AX_ID_SYS, 0x00, AX_ERR_NOMEM) //0x800B0018
+#define AX_ERR_CMM_UNKNOWN AX_DEF_ERR(AX_ID_SYS, 0x00, AX_ERR_UNKNOWN) //0x800B0029
+#define AX_ERR_CMM_MMAP_FAIL AX_DEF_ERR(AX_ID_SYS, 0x00, 0x80) //0x800B0080
+#define AX_ERR_CMM_MUNMAP_FAIL AX_DEF_ERR(AX_ID_SYS, 0x00, 0x81) //0x800B0081
+#define AX_ERR_CMM_FREE_FAIL AX_DEF_ERR(AX_ID_SYS, 0x00, 0x82) //0x800B0082
+
+#define AX_ERR_PTS_ILLEGAL_PARAM AX_DEF_ERR(AX_ID_SYS, 0x02, AX_ERR_ILLEGAL_PARAM) //0x800B020A
+#define AX_ERR_PTS_NULL_PTR AX_DEF_ERR(AX_ID_SYS, 0x02, AX_ERR_NULL_PTR) //0x800B020B
+#define AX_ERR_PTS_NOTREADY AX_DEF_ERR(AX_ID_SYS, 0x02, AX_ERR_SYS_NOTREADY) //0x800B0210
+#define AX_ERR_PTS_NOT_PERM AX_DEF_ERR(AX_ID_SYS, 0x02, AX_ERR_NOT_PERM) //0x800B0215
+#define AX_ERR_PTS_UNKNOWN AX_DEF_ERR(AX_ID_SYS, 0x02, AX_ERR_UNKNOWN) //0x800B0229
+
+#define AX_ERR_LINK_ILLEGAL_PARAM AX_DEF_ERR(AX_ID_SYS, 0x03, AX_ERR_ILLEGAL_PARAM) //0x800B030A
+#define AX_ERR_LINK_NULL_PTR AX_DEF_ERR(AX_ID_SYS, 0x03, AX_ERR_NULL_PTR) //0x800B030B
+#define AX_ERR_LINK_NOTREADY AX_DEF_ERR(AX_ID_SYS, 0x03, AX_ERR_SYS_NOTREADY) //0x800B0310
+#define AX_ERR_LINK_NOT_SUPPORT AX_DEF_ERR(AX_ID_SYS, 0x03, AX_ERR_NOT_SUPPORT) //0x800B0314
+#define AX_ERR_LINK_NOT_PERM AX_DEF_ERR(AX_ID_SYS, 0x03, AX_ERR_NOT_PERM) //0x800B0315
+#define AX_ERR_LINK_UNEXIST AX_DEF_ERR(AX_ID_SYS, 0x03, AX_ERR_UNEXIST) //0x800B0317
+#define AX_ERR_LINK_UNKNOWN AX_DEF_ERR(AX_ID_SYS, 0x03, AX_ERR_UNKNOWN) //0x800B0329
+#define AX_ERR_LINK_TABLE_FULL AX_DEF_ERR(AX_ID_SYS, 0x03, 0x80) //0x800B0380
+#define AX_ERR_LINK_TABLE_EMPTY AX_DEF_ERR(AX_ID_SYS, 0x03, 0x81) //0x800B0381
+
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+AX_S32 AX_SYS_Init(AX_VOID);
+AX_S32 AX_SYS_Deinit(AX_VOID);
+
+/* CMM API */
+AX_S32 AX_SYS_MemAlloc(AX_U64 *phyaddr, AX_VOID **pviraddr, AX_U32 size, AX_U32 align, const AX_S8 *token);
+AX_S32 AX_SYS_MemAllocCached(AX_U64 *phyaddr, AX_VOID **pviraddr, AX_U32 size, AX_U32 align, const AX_S8 *token);
+AX_S32 AX_SYS_MemFree(AX_U64 phyaddr, AX_VOID *pviraddr);
+AX_VOID *AX_SYS_Mmap(AX_U64 phyaddr, AX_U32 size);
+AX_VOID *AX_SYS_MmapCache(AX_U64 phyaddr, AX_U32 size);
+AX_VOID *AX_SYS_MmapFast(AX_U64 phyaddr, AX_U32 size);
+AX_VOID *AX_SYS_MmapCacheFast(AX_U64 phyaddr, AX_U32 size);
+AX_S32 AX_SYS_Munmap(AX_VOID *pviraddr, AX_U32 size);
+AX_S32 AX_SYS_MflushCache(AX_U64 phyaddr, AX_VOID *pviraddr, AX_U32 size);
+AX_S32 AX_SYS_MinvalidateCache(AX_U64 phyaddr, AX_VOID *pviraddr, AX_U32 size);
+AX_S32 AX_SYS_MemGetBlockInfoByPhy(AX_U64 phyaddr, AX_S32 *pmemType, AX_VOID **pviraddr, AX_U32 *pblockSize);
+AX_S32 AX_SYS_MemGetBlockInfoByVirt(AX_VOID *pviraddr, AX_U64 *phyaddr, AX_S32 *pmemType);
+AX_S32 AX_SYS_MemGetPartitionInfo(AX_CMM_PARTITION_INFO_T *pCmmPartitionInfo);
+AX_S32 AX_SYS_MemSetConfig(const AX_MOD_INFO_T *pModInfo, const AX_S8 *pPartitionName);
+AX_S32 AX_SYS_MemGetConfig(const AX_MOD_INFO_T *pModInfo, AX_S8 *pPartitionName);
+
+/* LINK API*/
+AX_S32 AX_SYS_Link(const AX_MOD_INFO_T *pSrc, const AX_MOD_INFO_T *pDest);
+AX_S32 AX_SYS_UnLink(const AX_MOD_INFO_T *pSrc, const AX_MOD_INFO_T *pDest);
+AX_S32 AX_SYS_GetLinkByDest(const AX_MOD_INFO_T *pDest, AX_MOD_INFO_T *pSrc);
+AX_S32 AX_SYS_GetLinkBySrc(const AX_MOD_INFO_T *pSrc, AX_LINK_DEST_T *pLinkDest);
+
+/* POOL API */
+AX_S32 AX_POOL_SetConfig(const AX_POOL_FLOORPLAN_T *pPoolFloorPlan);
+AX_S32 AX_POOL_GetConfig (AX_POOL_FLOORPLAN_T *pPoolFloorPlan);
+AX_S32 AX_POOL_Init(AX_VOID);
+AX_S32 AX_POOL_Exit(AX_VOID);
+AX_POOL AX_POOL_CreatePool(AX_POOL_CONFIG_T *pPoolConfig);
+AX_S32 AX_POOL_DestroyPool(AX_POOL PoolId);
+AX_BLK AX_POOL_GetBlock(AX_POOL PoolId, AX_U64 BlkSize, const AX_S8 *pPartitionName);
+AX_S32 AX_POOL_ReleaseBlock(AX_BLK BlockId);
+AX_BLK AX_POOL_PhysAddr2Handle(AX_U64 PhysAddr);
+AX_U64 AX_POOL_Handle2PhysAddr(AX_BLK BlockId);
+AX_U64 AX_POOL_Handle2MetaPhysAddr(AX_BLK BlockId);
+AX_POOL AX_POOL_Handle2PoolId(AX_BLK BlockId);
+AX_U64 AX_POOL_Handle2BlkSize(AX_BLK BlockId);
+AX_S32 AX_POOL_MmapPool(AX_POOL PoolId);
+AX_S32 AX_POOL_MunmapPool(AX_POOL PoolId);
+AX_VOID *AX_POOL_GetBlockVirAddr(AX_BLK BlockId);
+AX_VOID *AX_POOL_GetMetaVirAddr(AX_BLK BlockId);
+AX_S32 AX_POOL_IncreaseRefCnt(AX_BLK BlockId);
+AX_S32 AX_POOL_DecreaseRefCnt(AX_BLK BlockId);
+
+/* PTS API */
+AX_S32 AX_SYS_GetCurPTS(AX_U64 *pu64CurPTS);
+AX_S32 AX_SYS_InitPTSBase(AX_U64 u64PTSBase);
+AX_S32 AX_SYS_SyncPTS(AX_U64 u64PTSBase);
+
+/* LOG API */
+AX_S32 AX_SYS_SetLogLevel(AX_LOG_LEVEL_E target);
+AX_S32 AX_SYS_SetLogTarget(AX_LOG_TARGET_E target);
+AX_S32 AX_SYS_EnableTimestamp(AX_BOOL enable);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_AX_SYS_API_
diff --git a/sdk/axrt/include/ax_sys_log.h b/sdk/axrt/include/ax_sys_log.h
new file mode 100644
index 0000000000000000000000000000000000000000..f1ce6f2f2719ec3df1e27bc0a295328a724c5e16
--- /dev/null
+++ b/sdk/axrt/include/ax_sys_log.h
@@ -0,0 +1,77 @@
+/**************************************************************************************************
+ *
+ * Copyright (c) 2019-2024 Axera Semiconductor Co., Ltd. All Rights Reserved.
+ *
+ * This source file is the property of Axera Semiconductor Co., Ltd. and
+ * may not be copied or distributed in any isomorphic form without the prior
+ * written consent of Axera Semiconductor Co., Ltd.
+ *
+ **************************************************************************************************/
+
+#ifndef _AX_SYS_LOG_H_
+#define _AX_SYS_LOG_H_
+#include "ax_base_type.h"
+#include "ax_global_type.h"
+#include
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*
+ LOG_EMERG system is unusable
+ LOG_ALERT action must be taken immediately
+ LOG_CRIT critical conditions
+ LOG_ERR error conditions
+ LOG_WARNING warning conditions
+ LOG_NOTICE normal, but significant, condition
+ LOG_INFO informational message
+ LOG_DEBUG debug-level message
+*/
+
+AX_VOID AX_SYS_LogOpen();
+AX_VOID AX_SYS_LogClose();
+AX_VOID AX_SYS_LogPrint(AX_S32 level, AX_CHAR const *pFormat, ...);
+AX_VOID AX_SYS_LogOutput(AX_LOG_TARGET_E target, AX_LOG_LEVEL_E level, AX_CHAR const *format, va_list vlist);
+AX_VOID AX_SYS_LogPrint_Ex(AX_S32 level, AX_CHAR const *tag, int id, AX_CHAR const *pFormat, ...);
+AX_VOID AX_SYS_LogOutput_Ex(AX_LOG_TARGET_E target, AX_LOG_LEVEL_E level, AX_CHAR const *tag, int id, AX_CHAR const *format, va_list vlist);
+
+#ifdef __cplusplus
+}
+#endif
+
+#define MACRO_BLACK "\033[1;30;30m"
+#define MACRO_RED "\033[1;30;31m"
+#define MACRO_GREEN "\033[1;30;32m"
+#define MACRO_YELLOW "\033[1;30;33m"
+#define MACRO_BLUE "\033[1;30;34m"
+#define MACRO_PURPLE "\033[1;30;35m"
+#define MACRO_WHITE "\033[1;30;37m"
+#define MACRO_END "\033[0m"
+
+#define AX_MSYS_LOG_TAG "MSYS"
+
+#define AX_LOG_ERR(fmt,...) \
+ AX_SYS_LogPrint(SYS_LOG_ERROR, MACRO_RED"[E][%32s][%4d]: "fmt MACRO_END, __FUNCTION__, __LINE__, ##__VA_ARGS__);
+#define AX_LOG_WARN(fmt,...) \
+ AX_SYS_LogPrint(SYS_LOG_WARN, MACRO_BLUE"[W][%32s][%4d]: "fmt MACRO_END, __FUNCTION__, __LINE__, ##__VA_ARGS__);
+#define AX_LOG_INFO(fmt,...) \
+ AX_SYS_LogPrint(SYS_LOG_INFO, MACRO_GREEN"[I][%32s][%4d]: "fmt MACRO_END, __FUNCTION__, __LINE__, ##__VA_ARGS__);
+#define AX_LOG_DBG(fmt,...) \
+ AX_SYS_LogPrint(SYS_LOG_DEBUG, MACRO_WHITE"[D][%32s][%4d]: "fmt MACRO_END, __FUNCTION__, __LINE__, ##__VA_ARGS__);
+#define AX_LOG_NOTICE(fmt,...) \
+ AX_SYS_LogPrint(SYS_LOG_NOTICE, MACRO_PURPLE"[N][%32s][%4d]: "fmt MACRO_END, __FUNCTION__, __LINE__, ##__VA_ARGS__);
+
+#define AX_LOG_ERR_EX(tag,id,fmt,...) \
+ AX_SYS_LogPrint_Ex(SYS_LOG_ERROR, tag, id, MACRO_RED"[E][%32s][%4d]: "fmt MACRO_END , __FUNCTION__, __LINE__, ##__VA_ARGS__);
+#define AX_LOG_WARN_EX(tag,id,fmt,...) \
+ AX_SYS_LogPrint_Ex(SYS_LOG_WARN, tag, id, MACRO_BLUE"[W][%32s][%4d]: "fmt MACRO_END , __FUNCTION__, __LINE__, ##__VA_ARGS__);
+#define AX_LOG_INFO_EX(tag,id,fmt,...) \
+ AX_SYS_LogPrint_Ex(SYS_LOG_INFO, tag, id, MACRO_GREEN"[I][%32s][%4d]: "fmt MACRO_END , __FUNCTION__, __LINE__, ##__VA_ARGS__);
+#define AX_LOG_DBG_EX(tag,id,fmt,...) \
+ AX_SYS_LogPrint_Ex(SYS_LOG_DEBUG, tag, id, MACRO_WHITE"[D][%32s][%4d]: "fmt MACRO_END , __FUNCTION__, __LINE__, ##__VA_ARGS__);
+#define AX_LOG_NOTICE_EX(tag,id,fmt,...) \
+ AX_SYS_LogPrint_Ex(SYS_LOG_NOTICE, tag, id, MACRO_PURPLE"[N][%32s][%4d]: "fmt MACRO_END , __FUNCTION__, __LINE__, ##__VA_ARGS__);
+
+#endif //_AX_SYS_LOG_H_
diff --git a/sdk/axrt/lib/libax_engine.so b/sdk/axrt/lib/libax_engine.so
new file mode 100644
index 0000000000000000000000000000000000000000..57089545dbf2226d274567367e60238bef051658
--- /dev/null
+++ b/sdk/axrt/lib/libax_engine.so
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5e246dec9aa1727164178db7e2494a182fe112b245a954b267db829aba8fd0d8
+size 268816
diff --git a/sdk/axrt/lib/libax_sys.so b/sdk/axrt/lib/libax_sys.so
new file mode 100644
index 0000000000000000000000000000000000000000..7685c596691b69e8212c9fbf635f8cd0ae73bd57
Binary files /dev/null and b/sdk/axrt/lib/libax_sys.so differ
diff --git a/sdk/build.sh b/sdk/build.sh
new file mode 100644
index 0000000000000000000000000000000000000000..863936fa554d990886f13d88ed5dd7e833cd2963
--- /dev/null
+++ b/sdk/build.sh
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+# AX650 板端编译:kantts_tts
+set -e
+cd "$(dirname "$0")"
+g++ -O3 -march=native -ffast-math -std=c++17 \
+ -I include -I axrt/include \
+ src/ax_engine.cpp src/kantts.cpp src/main.cpp \
+ -L axrt/lib -lax_engine -lax_sys -lpthread \
+ -o kantts_tts
+echo "[build] OK: $(pwd)/kantts_tts"
diff --git a/sdk/include/ax_engine.hpp b/sdk/include/ax_engine.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..ce5bd772761993a3bdf5b01633d604b318185234
--- /dev/null
+++ b/sdk/include/ax_engine.hpp
@@ -0,0 +1,33 @@
+#pragma once
+#include
+#include
+#include