admin
commited on
Commit
·
d0ba5a2
1
Parent(s):
b4bbbc2
upd api
Browse files- README.md +1 -1
- instrument_timbre.py +4 -5
README.md
CHANGED
@@ -93,7 +93,7 @@ for item in ds["Western"]:
|
|
93 |
|
94 |
## Maintenance
|
95 |
```bash
|
96 |
-
|
97 |
cd instrument_timbre
|
98 |
```
|
99 |
|
|
|
93 |
|
94 |
## Maintenance
|
95 |
```bash
|
96 |
+
git clone [email protected]:datasets/ccmusic-database/instrument_timbre
|
97 |
cd instrument_timbre
|
98 |
```
|
99 |
|
instrument_timbre.py
CHANGED
@@ -70,12 +70,9 @@ _NAMES = [
|
|
70 |
"organ",
|
71 |
]
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
_DOMAIN = f"https://www.modelscope.cn/api/v1/datasets/ccmusic-database/{_DBNAME}/repo?Revision=master&FilePath=data"
|
76 |
-
|
77 |
-
_HOMEPAGE = f"https://www.modelscope.cn/datasets/ccmusic-database/{_DBNAME}"
|
78 |
|
|
|
79 |
|
80 |
_URLS = {
|
81 |
"audio": f"{_DOMAIN}/audio.zip",
|
@@ -161,6 +158,7 @@ class instrument_timbre(datasets.GeneratorBasedBuilder):
|
|
161 |
}
|
162 |
if region == "Chinese":
|
163 |
cn_dataset[i] = data
|
|
|
164 |
else:
|
165 |
en_dataset[i] = data
|
166 |
|
@@ -170,6 +168,7 @@ class instrument_timbre(datasets.GeneratorBasedBuilder):
|
|
170 |
if fname.endswith(".jpg"):
|
171 |
if os.path.basename(os.path.dirname(path)) == "Chinese":
|
172 |
cn_dataset[i]["mel"] = path
|
|
|
173 |
else:
|
174 |
en_dataset[i]["mel"] = path
|
175 |
|
|
|
70 |
"organ",
|
71 |
]
|
72 |
|
73 |
+
_HOMEPAGE = f"https://www.modelscope.cn/datasets/ccmusic-database/{os.path.basename(__file__)[:-3]}"
|
|
|
|
|
|
|
|
|
74 |
|
75 |
+
_DOMAIN = f"{_HOMEPAGE}/resolve/master/data"
|
76 |
|
77 |
_URLS = {
|
78 |
"audio": f"{_DOMAIN}/audio.zip",
|
|
|
158 |
}
|
159 |
if region == "Chinese":
|
160 |
cn_dataset[i] = data
|
161 |
+
|
162 |
else:
|
163 |
en_dataset[i] = data
|
164 |
|
|
|
168 |
if fname.endswith(".jpg"):
|
169 |
if os.path.basename(os.path.dirname(path)) == "Chinese":
|
170 |
cn_dataset[i]["mel"] = path
|
171 |
+
|
172 |
else:
|
173 |
en_dataset[i]["mel"] = path
|
174 |
|