Skip to content

Commit 0d1f98e

Browse files
authored
Add Android QNN demo for non-streaming zipformer with Reazonspeech (#3670)
1 parent a2b7ab9 commit 0d1f98e

10 files changed

Lines changed: 1165 additions & 30 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
input_in_seconds: str
17+
model_name: str
18+
19+
20+
def main():
21+
22+
model_name_list = ["20240801"]
23+
input_in_seconds = ["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+
# SM8350 does not support fp16
30+
continue
31+
for num_seconds, model_name in itertools.product(
32+
input_in_seconds, model_name_list
33+
):
34+
configs.append(
35+
Config(
36+
soc=name,
37+
soc_id=soc.model.value,
38+
arch=soc.info.arch.name,
39+
model_name=model_name,
40+
input_in_seconds=num_seconds,
41+
)
42+
)
43+
44+
ans = [asdict(c) for c in configs]
45+
46+
print(json.dumps({"include": ans}))
47+
48+
49+
if __name__ == "__main__":
50+
main()

.github/workflows/apk-qnn-vad-asr-simulated-streaming.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- apk
7-
- zipformer-ctc-qnn-2
7+
- export-reazonspeech-zipformer-qnn-2
88

99
workflow_dispatch:
1010

@@ -24,8 +24,8 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
os: [ubuntu-latest]
27-
total: ["10"]
28-
index: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
27+
total: ["20"]
28+
index: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"]
2929

3030
steps:
3131
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)