Skip to content

Commit 9961aee

Browse files
authored
Export Parakeet CTC models to QNN (k2-fsa#3686)
1 parent 6206c9c commit 9961aee

5 files changed

Lines changed: 831 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env python3
2+
# Copyright 2026 Xiaomi Corp. (authors: Fangjun Kuang)
3+
4+
import json
5+
6+
from device_info import soc_info_dict
7+
from dataclasses import asdict, dataclass
8+
import itertools
9+
10+
11+
@dataclass
12+
class Config:
13+
soc: str # SM8850
14+
soc_id: int # 87
15+
arch: str # v81
16+
num_seconds: int
17+
model_name: str
18+
19+
20+
def main():
21+
22+
model_name_list = ["parakeet-ctc-0.6b"]
23+
num_seconds_list = [3, 5, 8, 10, 13, 15, 18, 20, 23, 25, 28, 30]
24+
25+
configs = []
26+
27+
for name, soc in soc_info_dict.items():
28+
for num_seconds, model_name in itertools.product(
29+
num_seconds_list, model_name_list
30+
):
31+
configs.append(
32+
Config(
33+
soc=name,
34+
soc_id=soc.model.value,
35+
arch=soc.info.arch.name,
36+
model_name=model_name,
37+
num_seconds=num_seconds,
38+
)
39+
)
40+
41+
ans = [asdict(c) for c in configs]
42+
43+
print(json.dumps({"include": ans}))
44+
45+
46+
if __name__ == "__main__":
47+
main()

0 commit comments

Comments
 (0)