csukuangfj commited on
Commit
713c9b4
1 Parent(s): b62b24d

separate each release of APKs into separate directories

Browse files
generate-asr-2pass.py CHANGED
@@ -20,7 +20,8 @@ class APK:
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-arm64-v8a-asr_2pass-en-small_zipformer_whisper_tiny.apk
22
  # sherpa-onnx-1.9.23-x86-asr_2pass-en-small_zipformer_whisper_tiny.apk
23
- s = str(s)[len("asr-2pass/") :]
 
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
@@ -46,16 +47,24 @@ def sort_by_apk(x):
46
  return (x.major, x.minor, x.patch, x.arch, x.lang, x.short_name)
47
 
48
 
49
- def generate_url(files: List[str]) -> List[str]:
50
- ans = []
51
- base = BASE_URL
52
- for f in files:
53
- ans.append(base + str(f))
54
- return ans
 
 
 
 
 
 
 
 
 
55
 
 
56
 
57
- def get_all_files(d: str, suffix: str) -> List[str]:
58
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
59
  return list(map(lambda x: BASE_URL + str(x), ans))
60
 
61
 
@@ -192,7 +201,7 @@ see https://www.tablesgenerator.com/html_tables#
192
 
193
 
194
  def main():
195
- apk = get_all_files("asr-2pass", suffix="*.apk")
196
  to_file("./apk-asr-2pass.html", apk)
197
 
198
  # for Chinese users
 
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-arm64-v8a-asr_2pass-en-small_zipformer_whisper_tiny.apk
22
  # sherpa-onnx-1.9.23-x86-asr_2pass-en-small_zipformer_whisper_tiny.apk
23
+
24
+ s = str(s).split("/")[-1]
25
  split = s.split("-")
26
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
27
  self.arch = split[3]
 
47
  return (x.major, x.minor, x.patch, x.arch, x.lang, x.short_name)
48
 
49
 
50
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
51
+ if isinstance(d_list, str):
52
+ d_list = [d_list]
53
+ min_major = 1
54
+ min_minor = 9
55
+ min_patch = 10
56
+
57
+ ss = []
58
+ for d in d_list:
59
+ for root, _, files in os.walk(d):
60
+ for f in files:
61
+ if f.endswith(suffix):
62
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
63
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
64
+ ss.append(os.path.join(root, f))
65
 
66
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
67
 
 
 
68
  return list(map(lambda x: BASE_URL + str(x), ans))
69
 
70
 
 
201
 
202
 
203
  def main():
204
+ apk = get_all_files("asr-2pass", suffix=".apk")
205
  to_file("./apk-asr-2pass.html", apk)
206
 
207
  # for Chinese users
generate-asr.py CHANGED
@@ -20,7 +20,7 @@ class APK:
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-x86_64-asr-en-zipformer2.apk
22
  # sherpa-onnx-1.9.23-arm64-v8a-asr-zh-zipformer2.apk
23
- s = str(s)[len("asr/") :]
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
@@ -46,16 +46,25 @@ def sort_by_apk(x):
46
  return (x.major, x.minor, x.patch, x.arch, x.lang, x.short_name)
47
 
48
 
49
- def generate_url(files: List[str]) -> List[str]:
50
- ans = []
51
- base = BASE_URL
52
- for f in files:
53
- ans.append(base + str(f))
54
- return ans
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
- def get_all_files(d: str, suffix: str) -> List[str]:
58
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
59
  return list(map(lambda x: BASE_URL + str(x), ans))
60
 
61
 
@@ -187,7 +196,7 @@ see https://www.tablesgenerator.com/html_tables#
187
 
188
 
189
  def main():
190
- apk = get_all_files("asr", suffix="*.apk")
191
  to_file("./apk-asr.html", apk)
192
 
193
  # for Chinese users
 
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-x86_64-asr-en-zipformer2.apk
22
  # sherpa-onnx-1.9.23-arm64-v8a-asr-zh-zipformer2.apk
23
+ s = str(s).split("/")[-1]
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
 
46
  return (x.major, x.minor, x.patch, x.arch, x.lang, x.short_name)
47
 
48
 
49
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
50
+ if isinstance(d_list, str):
51
+ d_list = [d_list]
 
 
 
52
 
53
+ min_major = 1
54
+ min_minor = 9
55
+ min_patch = 10
56
+
57
+ ss = []
58
+ for d in d_list:
59
+ for root, _, files in os.walk(d):
60
+ for f in files:
61
+ if f.endswith(suffix):
62
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
63
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
64
+ ss.append(os.path.join(root, f))
65
+
66
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
67
 
 
 
68
  return list(map(lambda x: BASE_URL + str(x), ans))
69
 
70
 
 
196
 
197
 
198
  def main():
199
+ apk = get_all_files("asr", suffix=".apk")
200
  to_file("./apk-asr.html", apk)
201
 
202
  # for Chinese users
generate-audio-tagging-wearos.py CHANGED
@@ -18,7 +18,7 @@ class APK:
18
  short_name: str
19
 
20
  def __init__(self, s):
21
- s = str(s)[len("audio-tagging-wearos/") :]
22
  split = s.split("-")
23
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
24
  self.arch = split[3]
@@ -42,16 +42,25 @@ def sort_by_apk(x):
42
  return (x.major, x.minor, x.patch, x.arch, x.short_name)
43
 
44
 
45
- def generate_url(files: List[str]) -> List[str]:
46
- ans = []
47
- base = BASE_URL
48
- for f in files:
49
- ans.append(base + str(f))
50
- return ans
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
- def get_all_files(d: str, suffix: str) -> List[str]:
54
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
55
  return list(map(lambda x: BASE_URL + str(x), ans))
56
 
57
 
@@ -120,7 +129,7 @@ we support models from different frameworks. Please check the license of your se
120
 
121
 
122
  def main():
123
- apk = get_all_files("audio-tagging-wearos", suffix="*.apk")
124
  to_file("./apk-audio-tagging-wearos.html", apk)
125
 
126
  # for Chinese users
 
18
  short_name: str
19
 
20
  def __init__(self, s):
21
+ s = str(s).split("/")[-1]
22
  split = s.split("-")
23
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
24
  self.arch = split[3]
 
42
  return (x.major, x.minor, x.patch, x.arch, x.short_name)
43
 
44
 
45
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
46
+ if isinstance(d_list, str):
47
+ d_list = [d_list]
 
 
 
48
 
49
+ min_major = 1
50
+ min_minor = 9
51
+ min_patch = 10
52
+
53
+ ss = []
54
+ for d in d_list:
55
+ for root, _, files in os.walk(d):
56
+ for f in files:
57
+ if f.endswith(suffix):
58
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
59
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
60
+ ss.append(os.path.join(root, f))
61
+
62
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
63
 
 
 
64
  return list(map(lambda x: BASE_URL + str(x), ans))
65
 
66
 
 
129
 
130
 
131
  def main():
132
+ apk = get_all_files("audio-tagging-wearos", suffix=".apk")
133
  to_file("./apk-audio-tagging-wearos.html", apk)
134
 
135
  # for Chinese users
generate-audio-tagging.py CHANGED
@@ -18,7 +18,7 @@ class APK:
18
  short_name: str
19
 
20
  def __init__(self, s):
21
- s = str(s)[len("audio-tagging/") :]
22
  split = s.split("-")
23
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
24
  self.arch = split[3]
@@ -42,16 +42,25 @@ def sort_by_apk(x):
42
  return (x.major, x.minor, x.patch, x.arch, x.short_name)
43
 
44
 
45
- def generate_url(files: List[str]) -> List[str]:
46
- ans = []
47
- base = BASE_URL
48
- for f in files:
49
- ans.append(base + str(f))
50
- return ans
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
- def get_all_files(d: str, suffix: str) -> List[str]:
54
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
55
  return list(map(lambda x: BASE_URL + str(x), ans))
56
 
57
 
@@ -114,7 +123,7 @@ For APKs running on Android wathces with WearOS, please see
114
 
115
 
116
  def main():
117
- apk = get_all_files("audio-tagging", suffix="*.apk")
118
  to_file("./apk-audio-tagging.html", apk)
119
 
120
  # for Chinese users
 
18
  short_name: str
19
 
20
  def __init__(self, s):
21
+ s = str(s).split("/")[-1]
22
  split = s.split("-")
23
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
24
  self.arch = split[3]
 
42
  return (x.major, x.minor, x.patch, x.arch, x.short_name)
43
 
44
 
45
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
46
+ if isinstance(d_list, str):
47
+ d_list = [d_list]
 
 
 
48
 
49
+ min_major = 1
50
+ min_minor = 9
51
+ min_patch = 10
52
+
53
+ ss = []
54
+ for d in d_list:
55
+ for root, _, files in os.walk(d):
56
+ for f in files:
57
+ if f.endswith(suffix):
58
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
59
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
60
+ ss.append(os.path.join(root, f))
61
+
62
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
63
 
 
 
64
  return list(map(lambda x: BASE_URL + str(x), ans))
65
 
66
 
 
123
 
124
 
125
  def main():
126
+ apk = get_all_files("audio-tagging", suffix=".apk")
127
  to_file("./apk-audio-tagging.html", apk)
128
 
129
  # for Chinese users
generate-kws.py CHANGED
@@ -20,7 +20,7 @@ class APK:
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-arm64-v8a-kws-en-gigaspeech-zipformer.apk
22
  # sherpa-onnx-1.9.23-x86-kws-en-gigaspeech-zipformer.apk
23
- s = str(s)[len("asr/") :]
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
@@ -43,16 +43,25 @@ def sort_by_apk(x):
43
  return (x.major, x.minor, x.patch, x.arch, x.lang, x.short_name)
44
 
45
 
46
- def generate_url(files: List[str]) -> List[str]:
47
- ans = []
48
- base = BASE_URL
49
- for f in files:
50
- ans.append(base + str(f))
51
- return ans
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
- def get_all_files(d: str, suffix: str) -> List[str]:
55
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
56
  return list(map(lambda x: BASE_URL + str(x), ans))
57
 
58
 
@@ -149,7 +158,7 @@ see https://www.tablesgenerator.com/html_tables#
149
 
150
 
151
  def main():
152
- apk = get_all_files("kws", suffix="*.apk")
153
  to_file("./apk-kws.html", apk)
154
 
155
  # for Chinese users
 
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-arm64-v8a-kws-en-gigaspeech-zipformer.apk
22
  # sherpa-onnx-1.9.23-x86-kws-en-gigaspeech-zipformer.apk
23
+ s = str(s).split("/")[-1]
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
 
43
  return (x.major, x.minor, x.patch, x.arch, x.lang, x.short_name)
44
 
45
 
46
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
47
+ if isinstance(d_list, str):
48
+ d_list = [d_list]
 
 
 
49
 
50
+ min_major = 1
51
+ min_minor = 9
52
+ min_patch = 10
53
+
54
+ ss = []
55
+ for d in d_list:
56
+ for root, _, files in os.walk(d):
57
+ for f in files:
58
+ if f.endswith(suffix):
59
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
60
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
61
+ ss.append(os.path.join(root, f))
62
+
63
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
64
 
 
 
65
  return list(map(lambda x: BASE_URL + str(x), ans))
66
 
67
 
 
158
 
159
 
160
  def main():
161
+ apk = get_all_files("kws", suffix=".apk")
162
  to_file("./apk-kws.html", apk)
163
 
164
  # for Chinese users
generate-slid.py CHANGED
@@ -20,7 +20,7 @@ class APK:
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.22-x86-slid-whisper_tiny.apk
22
  # sherpa-onnx-1.9.22-arm64-v8a-slid-whisper_tiny.apk
23
- s = str(s)[len("slid/") :]
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
@@ -41,16 +41,25 @@ def sort_by_apk(x):
41
  return (x.major, x.minor, x.patch, x.arch, x.short_name)
42
 
43
 
44
- def generate_url(files: List[str]) -> List[str]:
45
- ans = []
46
- base = BASE_URL
47
- for f in files:
48
- ans.append(base + str(f))
49
- return ans
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
 
52
- def get_all_files(d: str, suffix: str) -> List[str]:
53
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
54
  return list(map(lambda x: BASE_URL + str(x), ans))
55
 
56
 
@@ -115,7 +124,7 @@ we support models from different frameworks. Please check the license of your se
115
 
116
 
117
  def main():
118
- apk = get_all_files("slid", suffix="*.apk")
119
  to_file("./apk-slid.html", apk)
120
 
121
  # for Chinese users
 
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.22-x86-slid-whisper_tiny.apk
22
  # sherpa-onnx-1.9.22-arm64-v8a-slid-whisper_tiny.apk
23
+ s = str(s).split("/")[-1]
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
 
41
  return (x.major, x.minor, x.patch, x.arch, x.short_name)
42
 
43
 
44
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
45
+ if isinstance(d_list, str):
46
+ d_list = [d_list]
 
 
 
47
 
48
+ min_major = 1
49
+ min_minor = 9
50
+ min_patch = 10
51
+
52
+ ss = []
53
+ for d in d_list:
54
+ for root, _, files in os.walk(d):
55
+ for f in files:
56
+ if f.endswith(suffix):
57
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
58
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
59
+ ss.append(os.path.join(root, f))
60
+
61
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
62
 
 
 
63
  return list(map(lambda x: BASE_URL + str(x), ans))
64
 
65
 
 
124
 
125
 
126
  def main():
127
+ apk = get_all_files("slid", suffix=".apk")
128
  to_file("./apk-slid.html", apk)
129
 
130
  # for Chinese users
generate-speaker-identification.py CHANGED
@@ -19,7 +19,7 @@ class APK:
19
  src: str # piper, coqui
20
 
21
  def __init__(self, s):
22
- s = str(s)[len("speaker-identification/") :]
23
  split = s.split("-")
24
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
25
  self.arch = split[3]
@@ -42,16 +42,25 @@ def sort_by_apk(x):
42
  return (x.major, x.minor, x.patch, x.arch, -ord(x.src[0]), -ord(x.lang[0]))
43
 
44
 
45
- def generate_url(files: List[str]) -> List[str]:
46
- ans = []
47
- base = BASE_URL
48
- for f in files:
49
- ans.append(base + str(f))
50
- return ans
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
- def get_all_files(d: str, suffix: str) -> List[str]:
54
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
55
  return list(map(lambda x: BASE_URL + str(x), ans))
56
 
57
 
@@ -125,7 +134,7 @@ we support models from different frameworks. Please check the license of your se
125
 
126
 
127
  def main():
128
- apk = get_all_files("speaker-identification", suffix="*.apk")
129
  to_file("./apk-speaker-identification.html", apk)
130
 
131
  # for Chinese users
 
19
  src: str # piper, coqui
20
 
21
  def __init__(self, s):
22
+ s = str(s).split("/")[-1]
23
  split = s.split("-")
24
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
25
  self.arch = split[3]
 
42
  return (x.major, x.minor, x.patch, x.arch, -ord(x.src[0]), -ord(x.lang[0]))
43
 
44
 
45
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
46
+ if isinstance(d_list, str):
47
+ d_list = [d_list]
 
 
 
48
 
49
+ min_major = 1
50
+ min_minor = 9
51
+ min_patch = 10
52
+
53
+ ss = []
54
+ for d in d_list:
55
+ for root, _, files in os.walk(d):
56
+ for f in files:
57
+ if f.endswith(suffix):
58
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
59
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
60
+ ss.append(os.path.join(root, f))
61
+
62
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
63
 
 
 
64
  return list(map(lambda x: BASE_URL + str(x), ans))
65
 
66
 
 
134
 
135
 
136
  def main():
137
+ apk = get_all_files("speaker-identification", suffix=".apk")
138
  to_file("./apk-speaker-identification.html", apk)
139
 
140
  # for Chinese users
generate-tts-engine.py CHANGED
@@ -19,11 +19,7 @@ class APK:
19
  src: str # piper, coqui
20
 
21
  def __init__(self, s):
22
- s = str(s)
23
- if "tts-engine-" in s:
24
- s = s[len("tts-engine-") + 1 :]
25
- else:
26
- s = s[len("tts-engine") :]
27
  split = s.split("-")
28
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
29
  self.arch = split[3]
@@ -46,20 +42,24 @@ def sort_by_apk(x):
46
  return (x.major, x.minor, x.patch, x.arch, -ord(x.src[0]), -ord(x.lang[0]))
47
 
48
 
49
- def generate_url(files: List[str]) -> List[str]:
50
- ans = []
51
- base = BASE_URL
52
- for f in files:
53
- ans.append(base + str(f))
54
- return ans
55
 
 
 
 
 
 
 
 
 
56
 
57
- def get_all_files(d: List[str], suffix: str) -> List[str]:
58
- files = []
59
- for k in d:
60
- files += list(Path(k).glob(suffix))
61
 
62
- ans = sorted(files, key=sort_by_apk, reverse=True)
63
  return list(map(lambda x: BASE_URL + str(x), ans))
64
 
65
 
@@ -140,7 +140,7 @@ we support models from different frameworks. Please check the license of your se
140
 
141
 
142
  def main():
143
- apk = get_all_files(["tts-engine", "tts-engine-2"], suffix="*.apk")
144
  to_file("./apk-engine.html", apk)
145
 
146
  # for Chinese users
 
19
  src: str # piper, coqui
20
 
21
  def __init__(self, s):
22
+ s = str(s).split("/")[-1]
 
 
 
 
23
  split = s.split("-")
24
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
25
  self.arch = split[3]
 
42
  return (x.major, x.minor, x.patch, x.arch, -ord(x.src[0]), -ord(x.lang[0]))
43
 
44
 
45
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
46
+ if isinstance(d_list, str):
47
+ d_list = [d_list]
48
+ min_major = 1
49
+ min_minor = 9
50
+ min_patch = 10
51
 
52
+ ss = []
53
+ for d in d_list:
54
+ for root, _, files in os.walk(d):
55
+ for f in files:
56
+ if f.endswith(suffix):
57
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
58
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
59
+ ss.append(os.path.join(root, f))
60
 
61
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
 
 
 
62
 
 
63
  return list(map(lambda x: BASE_URL + str(x), ans))
64
 
65
 
 
140
 
141
 
142
  def main():
143
+ apk = get_all_files(["tts-engine", "tts-engine-2", "tts-engine-new"], suffix=".apk")
144
  to_file("./apk-engine.html", apk)
145
 
146
  # for Chinese users
generate-tts.py CHANGED
@@ -20,10 +20,7 @@ class APK:
20
 
21
  def __init__(self, s):
22
  s = str(s)
23
- if "tts-" in s:
24
- s = s[len("tts-") + 1 :]
25
- else:
26
- s = s[len("tts") :]
27
  split = s.split("-")
28
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
29
  self.arch = split[3]
@@ -46,20 +43,24 @@ def sort_by_apk(x):
46
  return (x.major, x.minor, x.patch, x.arch, -ord(x.src[0]), -ord(x.lang[0]))
47
 
48
 
49
- def generate_url(files: List[str]) -> List[str]:
50
- ans = []
51
- base = BASE_URL
52
- for f in files:
53
- ans.append(base + str(f))
54
- return ans
55
 
 
 
 
 
 
 
 
 
56
 
57
- def get_all_files(d: List[str], suffix: str) -> List[str]:
58
- files = []
59
- for k in d:
60
- files += list(Path(k).glob(suffix))
61
 
62
- ans = sorted(files, key=sort_by_apk, reverse=True)
63
  return list(map(lambda x: BASE_URL + str(x), ans))
64
 
65
 
@@ -139,7 +140,7 @@ we support models from different frameworks. Please check the license of your se
139
 
140
 
141
  def main():
142
- apk = get_all_files(["tts", "tts-2"], suffix="*.apk")
143
  to_file("./apk.html", apk)
144
 
145
  # for Chinese users
 
20
 
21
  def __init__(self, s):
22
  s = str(s)
23
+ s = s.split("/")[-1]
 
 
 
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
 
43
  return (x.major, x.minor, x.patch, x.arch, -ord(x.src[0]), -ord(x.lang[0]))
44
 
45
 
46
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
47
+ if isinstance(d_list, str):
48
+ d_list = [d_list]
49
+ min_major = 1
50
+ min_minor = 9
51
+ min_patch = 10
52
 
53
+ ss = []
54
+ for d in d_list:
55
+ for root, _, files in os.walk(d):
56
+ for f in files:
57
+ if f.endswith(suffix):
58
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
59
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
60
+ ss.append(os.path.join(root, f))
61
 
62
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
 
 
 
63
 
 
64
  return list(map(lambda x: BASE_URL + str(x), ans))
65
 
66
 
 
140
 
141
 
142
  def main():
143
+ apk = get_all_files(["tts", "tts-2", "tts-new"], suffix=".apk")
144
  to_file("./apk.html", apk)
145
 
146
  # for Chinese users
generate-vad-asr.py CHANGED
@@ -20,7 +20,8 @@ class APK:
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-arm64-v8a-vad_asr-en-whisper_tiny.apk
22
  # sherpa-onnx-1.9.23-x86-vad_asr-en-whisper_tiny.apk
23
- s = str(s)[len("vad-asr/") :]
 
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
@@ -46,16 +47,24 @@ def sort_by_apk(x):
46
  return (x.major, x.minor, x.patch, x.arch, x.lang, x.short_name)
47
 
48
 
49
- def generate_url(files: List[str]) -> List[str]:
50
- ans = []
51
- base = BASE_URL
52
- for f in files:
53
- ans.append(base + str(f))
54
- return ans
55
 
 
 
 
 
 
 
 
 
 
 
56
 
57
- def get_all_files(d: str, suffix: str) -> List[str]:
58
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
59
  return list(map(lambda x: BASE_URL + str(x), ans))
60
 
61
 
@@ -202,7 +211,7 @@ see https://www.tablesgenerator.com/html_tables#
202
 
203
 
204
  def main():
205
- apk = get_all_files("vad-asr", suffix="*.apk")
206
  to_file("./apk-vad-asr.html", apk)
207
 
208
  # for Chinese users
 
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-arm64-v8a-vad_asr-en-whisper_tiny.apk
22
  # sherpa-onnx-1.9.23-x86-vad_asr-en-whisper_tiny.apk
23
+ s = str(s)
24
+ s = s.split("/")[-1]
25
  split = s.split("-")
26
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
27
  self.arch = split[3]
 
47
  return (x.major, x.minor, x.patch, x.arch, x.lang, x.short_name)
48
 
49
 
50
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
51
+ if isinstance(d_list, str):
52
+ d_list = [d_list]
53
+ min_major = 1
54
+ min_minor = 9
55
+ min_patch = 10
56
 
57
+ ss = []
58
+ for d in d_list:
59
+ for root, _, files in os.walk(d):
60
+ for f in files:
61
+ if f.endswith(suffix):
62
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
63
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
64
+ ss.append(os.path.join(root, f))
65
+
66
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
67
 
 
 
68
  return list(map(lambda x: BASE_URL + str(x), ans))
69
 
70
 
 
211
 
212
 
213
  def main():
214
+ apk = get_all_files("vad-asr", suffix=".apk")
215
  to_file("./apk-vad-asr.html", apk)
216
 
217
  # for Chinese users
generate-vad.py CHANGED
@@ -20,7 +20,7 @@ class APK:
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-arm64-v8a-silero_vad.apk
22
  # sherpa-onnx-1.9.23-x86-silero_vad.apk
23
- s = str(s)[len("asr/") :]
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
@@ -49,8 +49,24 @@ def generate_url(files: List[str]) -> List[str]:
49
  return ans
50
 
51
 
52
- def get_all_files(d: str, suffix: str) -> List[str]:
53
- ans = sorted(Path(d).glob(suffix), key=sort_by_apk, reverse=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  return list(map(lambda x: BASE_URL + str(x), ans))
55
 
56
 
@@ -140,7 +156,7 @@ see https://www.tablesgenerator.com/html_tables#
140
 
141
 
142
  def main():
143
- apk = get_all_files("vad", suffix="*.apk")
144
  to_file("./apk-vad.html", apk)
145
 
146
  # for Chinese users
 
20
  def __init__(self, s):
21
  # sherpa-onnx-1.9.23-arm64-v8a-silero_vad.apk
22
  # sherpa-onnx-1.9.23-x86-silero_vad.apk
23
+ s = str(s).split("/")[-1]
24
  split = s.split("-")
25
  self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
26
  self.arch = split[3]
 
49
  return ans
50
 
51
 
52
+ def get_all_files(d_list: List[str], suffix: str) -> List[str]:
53
+ if isinstance(d_list, str):
54
+ d_list = [d_list]
55
+ min_major = 1
56
+ min_minor = 9
57
+ min_patch = 10
58
+
59
+ ss = []
60
+ for d in d_list:
61
+ for root, _, files in os.walk(d):
62
+ for f in files:
63
+ if f.endswith(suffix):
64
+ major, minor, patch = list(map(int, f.split("-")[2].split(".")))
65
+ if major >= min_major and minor >= min_minor and patch >= min_patch:
66
+ ss.append(os.path.join(root, f))
67
+
68
+ ans = sorted(ss, key=sort_by_apk, reverse=True)
69
+
70
  return list(map(lambda x: BASE_URL + str(x), ans))
71
 
72
 
 
156
 
157
 
158
  def main():
159
+ apk = get_all_files("vad", suffix=".apk")
160
  to_file("./apk-vad.html", apk)
161
 
162
  # for Chinese users