update
Browse files- .gitattributes +1 -0
- .gitignore +5 -0
- README.md +1 -1
- data/wav_finished/EarlyMedia-1.zip +3 -0
- data/wav_finished/EarlyMedia-55.zip +3 -0
- data/wav_finished/EarlyMedia-60.zip +3 -0
- data/wav_finished/EarlyMedia-62.zip +3 -0
- data/wav_finished/EarlyMedia-66.zip +3 -0
- data/wav_finished/en-IN.zip +3 -0
- data/wav_finished/en-PH.zip +3 -0
- data/wav_finished/en-SG.zip +3 -0
- data/wav_finished/en-US.zip +3 -0
- data/wav_finished/es-MX.zip +3 -0
- data/wav_finished/es-PE.zip +3 -0
- data/wav_finished/id-ID.zip +3 -0
- data/wav_finished/ja-JP.zip +3 -0
- data/wav_finished/ko-KR.zip +3 -0
- data/wav_finished/ms-MY.zip +3 -0
- data/wav_finished/pt-BR.zip +3 -0
- data/wav_finished/th-TH.zip +3 -0
- data/wav_finished/zh-TW.zip +3 -0
- main.py +22 -0
- requirements.txt +3 -0
- vm_sound_classification.py +111 -0
.gitattributes
CHANGED
@@ -53,3 +53,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
53 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
55 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
56 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
.idea/
|
4 |
+
|
5 |
+
**/*.wav
|
README.md
CHANGED
@@ -9,4 +9,4 @@ language:
|
|
9 |
size_categories:
|
10 |
- 100M<n<1B
|
11 |
---
|
12 |
-
## 国际语音,电话场景中的声音分类
|
|
|
9 |
size_categories:
|
10 |
- 100M<n<1B
|
11 |
---
|
12 |
+
## 国际语音,电话场景中的声音分类
|
data/wav_finished/EarlyMedia-1.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:803bbd4df4128e907da0a538feadb4c2aec476bdc9e19b1fb31d2b8f8286efe0
|
3 |
+
size 14481345
|
data/wav_finished/EarlyMedia-55.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0224bda753acbc7d0907f7930391901eb7db8f05bdd62ab308be92320f93e04f
|
3 |
+
size 5780499
|
data/wav_finished/EarlyMedia-60.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a45db4f67360b899329026f92bb6ed67d6f882743273c2162fdd95b1249a256f
|
3 |
+
size 14095324
|
data/wav_finished/EarlyMedia-62.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3dd28d6d6907d9458a0de10718be25553f0395fd01f8052354b3d75c9cee1d67
|
3 |
+
size 8500765
|
data/wav_finished/EarlyMedia-66.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8b2aaed1253628ffe50f3c1eeef2f44ed51ec81017eb27e98dc8d9864c468e2c
|
3 |
+
size 1007577
|
data/wav_finished/en-IN.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0161016155044b4c35271f92c654b5044a3d7c035c2042443ada0b416604d4ce
|
3 |
+
size 9009410
|
data/wav_finished/en-PH.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5cf3eea626b14949cd8ac48938aeb534f89f65dd634bef91ccbf447cad07366c
|
3 |
+
size 44711319
|
data/wav_finished/en-SG.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b3014312f09a0a784ac5537b72ab08f5354a898c367170b644240640805b0cc6
|
3 |
+
size 2171956
|
data/wav_finished/en-US.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:543cfee47ebaebcdc90055ba5ecb07650c963ae8be9f7a4a13e12353e8ad3e4e
|
3 |
+
size 113419310
|
data/wav_finished/es-MX.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c59f14a095563d7a591b8f1ccc25d3eae8e3a52675a04b79911de25c388b64f5
|
3 |
+
size 94549860
|
data/wav_finished/es-PE.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:41f492ba8257e5ae42a4e3b4232968891085457006979b787efc9dc93c55b351
|
3 |
+
size 81549745
|
data/wav_finished/id-ID.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bde2e8f8730ff253256c304bdf19f97c42106a2dfa54a7c8e8562ac6877bb4f9
|
3 |
+
size 79415838
|
data/wav_finished/ja-JP.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f0314d0cdcade4ddaeb1a6bf1f9754aaa0ee2bacafe3d42d16cb450a78cb33d7
|
3 |
+
size 101614266
|
data/wav_finished/ko-KR.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8fe34031619b61aca04028b6ef98aff9ca394e5ac2586d611a720a03d1b3e950
|
3 |
+
size 47737164
|
data/wav_finished/ms-MY.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ecbe868fd83102d7637a18f986cead93d5b16a0082aa21681759b9adc9e0539
|
3 |
+
size 67709965
|
data/wav_finished/pt-BR.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5f2739a6d678a1eb25acbfdf055907786363ebcdb69b20ac1a1a2cb24317bb46
|
3 |
+
size 11864702
|
data/wav_finished/th-TH.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:294de2f8b945f49ce38b766570e7e510ad51e6ee91fa41c8bc474c2fd3fab4fe
|
3 |
+
size 3886399
|
data/wav_finished/zh-TW.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b784f46f6fdcc253ae94e6cf842375500747034cda416487b6a08ad8ba2ec2eb
|
3 |
+
size 147740684
|
main.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/python3
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
from datasets import load_dataset
|
4 |
+
from tqdm import tqdm
|
5 |
+
|
6 |
+
|
7 |
+
def main():
|
8 |
+
dataset = load_dataset(
|
9 |
+
"vm_sound_classification.py",
|
10 |
+
name="th-TH",
|
11 |
+
split="train",
|
12 |
+
trust_remote_code=True,
|
13 |
+
)
|
14 |
+
print(dataset)
|
15 |
+
|
16 |
+
for sample in tqdm(dataset):
|
17 |
+
print(sample)
|
18 |
+
return
|
19 |
+
|
20 |
+
|
21 |
+
if __name__ == '__main__':
|
22 |
+
main()
|
requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
datasets
|
2 |
+
librosa
|
3 |
+
soundfile
|
vm_sound_classification.py
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/python3
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
from glob import glob
|
4 |
+
import os
|
5 |
+
from pathlib import Path
|
6 |
+
|
7 |
+
import datasets
|
8 |
+
|
9 |
+
|
10 |
+
_URLS = {
|
11 |
+
"EarlyMedia-1": "data/wav_finished/EarlyMedia-1.zip",
|
12 |
+
"EarlyMedia-55": "data/wav_finished/EarlyMedia-55.zip",
|
13 |
+
"EarlyMedia-60": "data/wav_finished/EarlyMedia-60.zip",
|
14 |
+
"EarlyMedia-62": "data/wav_finished/EarlyMedia-62.zip",
|
15 |
+
"EarlyMedia-66": "data/wav_finished/EarlyMedia-66.zip",
|
16 |
+
"en-IN": "data/wav_finished/en-IN.zip",
|
17 |
+
"en-PH": "data/wav_finished/en-PH.zip",
|
18 |
+
"en-SG": "data/wav_finished/en-SG.zip",
|
19 |
+
"en-US": "data/wav_finished/en-US.zip",
|
20 |
+
"es-MX": "data/wav_finished/es-MX.zip",
|
21 |
+
"es-PE": "data/wav_finished/es-PE.zip",
|
22 |
+
"id-ID": "data/wav_finished/id-ID.zip",
|
23 |
+
"ja-JP": "data/wav_finished/ja-JP.zip",
|
24 |
+
"ko-KR": "data/wav_finished/ko-KR.zip",
|
25 |
+
"ms-MY": "data/wav_finished/ms-MY.zip",
|
26 |
+
"pt-BR": "data/wav_finished/pt-BR.zip",
|
27 |
+
"th-TH": "data/wav_finished/th-TH.zip",
|
28 |
+
"zh-TW": "data/wav_finished/zh-TW.zip",
|
29 |
+
|
30 |
+
}
|
31 |
+
|
32 |
+
|
33 |
+
_CITATION = """\
|
34 |
+
@dataset{early_media,
|
35 |
+
author = {Xing Tian},
|
36 |
+
title = {vm_sound_classification},
|
37 |
+
month = aug,
|
38 |
+
year = 2024,
|
39 |
+
publisher = {Xing Tian},
|
40 |
+
version = {1.0},
|
41 |
+
}
|
42 |
+
"""
|
43 |
+
|
44 |
+
|
45 |
+
_DESCRIPTION = """\
|
46 |
+
|
47 |
+
"""
|
48 |
+
|
49 |
+
|
50 |
+
VERSION = datasets.Version("1.0.0")
|
51 |
+
|
52 |
+
|
53 |
+
class VMSoundClassification(datasets.GeneratorBasedBuilder):
|
54 |
+
|
55 |
+
BUILDER_CONFIGS = [
|
56 |
+
datasets.BuilderConfig(name=name, version=VERSION, description=name) for name in _URLS.keys()
|
57 |
+
]
|
58 |
+
|
59 |
+
def _info(self):
|
60 |
+
features = datasets.Features(
|
61 |
+
{
|
62 |
+
"country": datasets.Value("string"),
|
63 |
+
"label": datasets.Value("string"),
|
64 |
+
"path": datasets.Value("string"),
|
65 |
+
"audio": datasets.Audio(sampling_rate=8000),
|
66 |
+
}
|
67 |
+
)
|
68 |
+
|
69 |
+
return datasets.DatasetInfo(
|
70 |
+
description=_DESCRIPTION,
|
71 |
+
features=features,
|
72 |
+
supervised_keys=None,
|
73 |
+
homepage="",
|
74 |
+
license="",
|
75 |
+
citation=_CITATION,
|
76 |
+
)
|
77 |
+
|
78 |
+
def _split_generators(self, dl_manager):
|
79 |
+
"""Returns SplitGenerators."""
|
80 |
+
url = _URLS[self.config.name]
|
81 |
+
dl_path = dl_manager.download_and_extract(url)
|
82 |
+
archive_path = os.path.join(dl_path, self.config.name)
|
83 |
+
|
84 |
+
return [
|
85 |
+
datasets.SplitGenerator(
|
86 |
+
name=datasets.Split.TRAIN,
|
87 |
+
gen_kwargs={"archive_path": archive_path, "split": "train"},
|
88 |
+
),
|
89 |
+
]
|
90 |
+
|
91 |
+
def _generate_examples(self, archive_path, split):
|
92 |
+
"""Yields examples."""
|
93 |
+
archive_path = Path(archive_path)
|
94 |
+
|
95 |
+
filename_list = archive_path.glob("*/*/*.wav")
|
96 |
+
for idx, filename in enumerate(filename_list):
|
97 |
+
|
98 |
+
label = filename.parts[-2]
|
99 |
+
country = filename.parts[-4]
|
100 |
+
|
101 |
+
yield idx, {
|
102 |
+
"country": country,
|
103 |
+
"label": label,
|
104 |
+
"path": filename.as_posix(),
|
105 |
+
"audio": filename.as_posix(),
|
106 |
+
|
107 |
+
}
|
108 |
+
|
109 |
+
|
110 |
+
if __name__ == '__main__':
|
111 |
+
pass
|