Skip to content

Commit d250d04

Browse files
authored
Export Parakeet TDT models to QNN (k2-fsa#3719)
1 parent e5cece2 commit d250d04

7 files changed

Lines changed: 815 additions & 4 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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-tdt-0.6b-v2", "parakeet-tdt-0.6b-v3"]
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+
if soc.model.name == "SM8350":
29+
continue
30+
for num_seconds, model_name in itertools.product(
31+
num_seconds_list, model_name_list
32+
):
33+
configs.append(
34+
Config(
35+
soc=name,
36+
soc_id=soc.model.value,
37+
arch=soc.info.arch.name,
38+
model_name=model_name,
39+
num_seconds=num_seconds,
40+
)
41+
)
42+
43+
ans = [asdict(c) for c in configs]
44+
45+
print(json.dumps({"include": ans}))
46+
47+
48+
if __name__ == "__main__":
49+
main()

0 commit comments

Comments
 (0)