csukuangfj
commited on
Commit
•
b3439d5
1
Parent(s):
fdb75f4
small fixes
Browse files- generate-audio-tagging-wearos.py +19 -0
- generate-audio-tagging.py +20 -0
- generate-slid.py +20 -0
- generate-speaker-identification.py +21 -1
- generate-tts-engine.py +19 -0
- generate-tts.py +18 -0
generate-audio-tagging-wearos.py
CHANGED
@@ -94,6 +94,17 @@ For APKs running on Android phones, please see
|
|
94 |
<br/>
|
95 |
<div/>
|
96 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
with open(filename, "w") as f:
|
98 |
print(content, file=f)
|
99 |
for x in files:
|
@@ -105,6 +116,14 @@ def main():
|
|
105 |
apk = get_all_files("audio-tagging-wearos", suffix="*.apk")
|
106 |
to_file("./apk-audio-tagging-wearos.html", apk)
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
if __name__ == "__main__":
|
110 |
main()
|
|
|
94 |
<br/>
|
95 |
<div/>
|
96 |
"""
|
97 |
+
|
98 |
+
if "-cn" not in filename:
|
99 |
+
content += """
|
100 |
+
For Chinese users, please <a href="./apk-wearos-cn.html">visit this address</a>,
|
101 |
+
which replaces <a href="huggingface.co">huggingface.co</a> with <a href="hf-mirror.com">hf-mirror.com</a>
|
102 |
+
<br/>
|
103 |
+
<br/>
|
104 |
+
中文用户, 请访问<a href="./apk-wearos-cn.html">这个地址</a>
|
105 |
+
<br/>
|
106 |
+
<br/>
|
107 |
+
"""
|
108 |
with open(filename, "w") as f:
|
109 |
print(content, file=f)
|
110 |
for x in files:
|
|
|
116 |
apk = get_all_files("audio-tagging-wearos", suffix="*.apk")
|
117 |
to_file("./apk-audio-tagging-wearos.html", apk)
|
118 |
|
119 |
+
# for Chinese users
|
120 |
+
apk2 = []
|
121 |
+
for a in apk:
|
122 |
+
a = a.replace("huggingface.co", "hf-mirror.com")
|
123 |
+
apk2.append(a)
|
124 |
+
|
125 |
+
to_file("./apk-audio-tagging-wearos-cn.html", apk2)
|
126 |
+
|
127 |
|
128 |
if __name__ == "__main__":
|
129 |
main()
|
generate-audio-tagging.py
CHANGED
@@ -94,6 +94,18 @@ For APKs running on Android wathces with WearOS, please see
|
|
94 |
<br/>
|
95 |
<div/>
|
96 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
with open(filename, "w") as f:
|
98 |
print(content, file=f)
|
99 |
for x in files:
|
@@ -105,6 +117,14 @@ def main():
|
|
105 |
apk = get_all_files("audio-tagging", suffix="*.apk")
|
106 |
to_file("./apk-audio-tagging.html", apk)
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
if __name__ == "__main__":
|
110 |
main()
|
|
|
94 |
<br/>
|
95 |
<div/>
|
96 |
"""
|
97 |
+
|
98 |
+
if "-cn" not in filename:
|
99 |
+
content += """
|
100 |
+
For Chinese users, please <a href="./apk-cn.html">visit this address</a>,
|
101 |
+
which replaces <a href="huggingface.co">huggingface.co</a> with <a href="hf-mirror.com">hf-mirror.com</a>
|
102 |
+
<br/>
|
103 |
+
<br/>
|
104 |
+
中文用户, 请访问<a href="./apk-cn.html">这个地址</a>
|
105 |
+
<br/>
|
106 |
+
<br/>
|
107 |
+
"""
|
108 |
+
|
109 |
with open(filename, "w") as f:
|
110 |
print(content, file=f)
|
111 |
for x in files:
|
|
|
117 |
apk = get_all_files("audio-tagging", suffix="*.apk")
|
118 |
to_file("./apk-audio-tagging.html", apk)
|
119 |
|
120 |
+
# for Chinese users
|
121 |
+
apk2 = []
|
122 |
+
for a in apk:
|
123 |
+
a = a.replace("huggingface.co", "hf-mirror.com")
|
124 |
+
apk2.append(a)
|
125 |
+
|
126 |
+
to_file("./apk-audio-tagging-cn.html", apk2)
|
127 |
+
|
128 |
|
129 |
if __name__ == "__main__":
|
130 |
main()
|
generate-slid.py
CHANGED
@@ -88,6 +88,18 @@ for more information.
|
|
88 |
|
89 |
<div/>
|
90 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
with open(filename, "w") as f:
|
92 |
print(content, file=f)
|
93 |
for x in files:
|
@@ -99,6 +111,14 @@ def main():
|
|
99 |
apk = get_all_files("slid", suffix="*.apk")
|
100 |
to_file("./apk-slid.html", apk)
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
if __name__ == "__main__":
|
104 |
main()
|
|
|
88 |
|
89 |
<div/>
|
90 |
"""
|
91 |
+
|
92 |
+
if "-cn" not in filename:
|
93 |
+
content += """
|
94 |
+
For Chinese users, please <a href="./apk-cn.html">visit this address</a>,
|
95 |
+
which replaces <a href="huggingface.co">huggingface.co</a> with <a href="hf-mirror.com">hf-mirror.com</a>
|
96 |
+
<br/>
|
97 |
+
<br/>
|
98 |
+
中文用户, 请访问<a href="./apk-cn.html">这个地址</a>
|
99 |
+
<br/>
|
100 |
+
<br/>
|
101 |
+
"""
|
102 |
+
|
103 |
with open(filename, "w") as f:
|
104 |
print(content, file=f)
|
105 |
for x in files:
|
|
|
111 |
apk = get_all_files("slid", suffix="*.apk")
|
112 |
to_file("./apk-slid.html", apk)
|
113 |
|
114 |
+
# for Chinese users
|
115 |
+
apk2 = []
|
116 |
+
for a in apk:
|
117 |
+
a = a.replace("huggingface.co", "hf-mirror.com")
|
118 |
+
apk2.append(a)
|
119 |
+
|
120 |
+
to_file("./apk-slid-cn.html", apk2)
|
121 |
+
|
122 |
|
123 |
if __name__ == "__main__":
|
124 |
main()
|
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(
|
23 |
split = s.split("-")
|
24 |
self.major, self.minor, self.patch = list(map(int, split[2].split(".")))
|
25 |
self.arch = split[3]
|
@@ -98,6 +98,18 @@ You can download all supported models from
|
|
98 |
<br/>
|
99 |
<div/>
|
100 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
with open(filename, "w") as f:
|
102 |
print(content, file=f)
|
103 |
for x in files:
|
@@ -109,6 +121,14 @@ def main():
|
|
109 |
apk = get_all_files("speaker-identification", suffix="*.apk")
|
110 |
to_file("./apk-speaker-identification.html", apk)
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
if __name__ == "__main__":
|
114 |
main()
|
|
|
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]
|
|
|
98 |
<br/>
|
99 |
<div/>
|
100 |
"""
|
101 |
+
|
102 |
+
if "-cn" not in filename:
|
103 |
+
content += """
|
104 |
+
For Chinese users, please <a href="./apk-cn.html">visit this address</a>,
|
105 |
+
which replaces <a href="huggingface.co">huggingface.co</a> with <a href="hf-mirror.com">hf-mirror.com</a>
|
106 |
+
<br/>
|
107 |
+
<br/>
|
108 |
+
中文用户, 请访问<a href="./apk-cn.html">这个地址</a>
|
109 |
+
<br/>
|
110 |
+
<br/>
|
111 |
+
"""
|
112 |
+
|
113 |
with open(filename, "w") as f:
|
114 |
print(content, file=f)
|
115 |
for x in files:
|
|
|
121 |
apk = get_all_files("speaker-identification", suffix="*.apk")
|
122 |
to_file("./apk-speaker-identification.html", apk)
|
123 |
|
124 |
+
# for Chinese users
|
125 |
+
apk2 = []
|
126 |
+
for a in apk:
|
127 |
+
a = a.replace("huggingface.co", "hf-mirror.com")
|
128 |
+
apk2.append(a)
|
129 |
+
|
130 |
+
to_file("./apk-speaker-identification-cn.html", apk2)
|
131 |
+
|
132 |
|
133 |
if __name__ == "__main__":
|
134 |
main()
|
generate-tts-engine.py
CHANGED
@@ -106,6 +106,17 @@ at
|
|
106 |
<br/>
|
107 |
<div/>
|
108 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
with open(filename, "w") as f:
|
110 |
print(content, file=f)
|
111 |
for x in files:
|
@@ -118,6 +129,14 @@ def main():
|
|
118 |
apk += get_all_files("tts-engine-2", suffix="*.apk")
|
119 |
to_file("./apk-engine.html", apk)
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
if __name__ == "__main__":
|
123 |
main()
|
|
|
106 |
<br/>
|
107 |
<div/>
|
108 |
"""
|
109 |
+
if "-cn" not in filename:
|
110 |
+
content += """
|
111 |
+
For Chinese users, please <a href="./apk-engine-cn.html">visit this address</a>,
|
112 |
+
which replaces <a href="huggingface.co">huggingface.co</a> with <a href="hf-mirror.com">hf-mirror.com</a>
|
113 |
+
<br/>
|
114 |
+
<br/>
|
115 |
+
中文用户, 请访问<a href="./apk-engine-cn.html">这个地址</a>
|
116 |
+
<br/>
|
117 |
+
<br/>
|
118 |
+
"""
|
119 |
+
|
120 |
with open(filename, "w") as f:
|
121 |
print(content, file=f)
|
122 |
for x in files:
|
|
|
129 |
apk += get_all_files("tts-engine-2", suffix="*.apk")
|
130 |
to_file("./apk-engine.html", apk)
|
131 |
|
132 |
+
# for Chinese users
|
133 |
+
apk2 = []
|
134 |
+
for a in apk:
|
135 |
+
a = a.replace("huggingface.co", "hf-mirror.com")
|
136 |
+
apk2.append(a)
|
137 |
+
|
138 |
+
to_file("./apk-engine-cn.html", apk2)
|
139 |
+
|
140 |
|
141 |
if __name__ == "__main__":
|
142 |
main()
|
generate-tts.py
CHANGED
@@ -106,6 +106,16 @@ at
|
|
106 |
<br/>
|
107 |
<div/>
|
108 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
with open(filename, "w") as f:
|
110 |
print(content, file=f)
|
111 |
for x in files:
|
@@ -118,6 +128,14 @@ def main():
|
|
118 |
apk += get_all_files("tts-2", suffix="*.apk")
|
119 |
to_file("./apk.html", apk)
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
if __name__ == "__main__":
|
123 |
main()
|
|
|
106 |
<br/>
|
107 |
<div/>
|
108 |
"""
|
109 |
+
if "-cn" not in filename:
|
110 |
+
content += """
|
111 |
+
For Chinese users, please <a href="./apk-cn.html">visit this address</a>,
|
112 |
+
which replaces <a href="huggingface.co">huggingface.co</a> with <a href="hf-mirror.com">hf-mirror.com</a>
|
113 |
+
<br/>
|
114 |
+
<br/>
|
115 |
+
中文用户, 请访问<a href="./apk-cn.html">这个地址</a>
|
116 |
+
<br/>
|
117 |
+
<br/>
|
118 |
+
"""
|
119 |
with open(filename, "w") as f:
|
120 |
print(content, file=f)
|
121 |
for x in files:
|
|
|
128 |
apk += get_all_files("tts-2", suffix="*.apk")
|
129 |
to_file("./apk.html", apk)
|
130 |
|
131 |
+
# for Chinese users
|
132 |
+
apk2 = []
|
133 |
+
for a in apk:
|
134 |
+
a = a.replace("huggingface.co", "hf-mirror.com")
|
135 |
+
apk2.append(a)
|
136 |
+
|
137 |
+
to_file("./apk-cn.html", apk2)
|
138 |
+
|
139 |
|
140 |
if __name__ == "__main__":
|
141 |
main()
|