add ko-KR.zip
Browse files- .gitignore +3 -0
- data/ko-KR.zip +3 -0
- examples/count.py +62 -0
- examples/make_test_audios.py +20 -3
- requirements.txt +1 -0
.gitignore
CHANGED
|
@@ -8,11 +8,14 @@
|
|
| 8 |
**/__pycache__/
|
| 9 |
|
| 10 |
data/es-MX
|
|
|
|
| 11 |
data/pt-BR
|
| 12 |
data/52
|
| 13 |
data/55
|
|
|
|
| 14 |
data/52.zip
|
| 15 |
data/55.zip
|
|
|
|
| 16 |
/docs/
|
| 17 |
/dotenv/
|
| 18 |
/hub_datasets/
|
|
|
|
| 8 |
**/__pycache__/
|
| 9 |
|
| 10 |
data/es-MX
|
| 11 |
+
data/ko-KR
|
| 12 |
data/pt-BR
|
| 13 |
data/52
|
| 14 |
data/55
|
| 15 |
+
data/82
|
| 16 |
data/52.zip
|
| 17 |
data/55.zip
|
| 18 |
+
data/82.zip
|
| 19 |
/docs/
|
| 20 |
/dotenv/
|
| 21 |
/hub_datasets/
|
data/ko-KR.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:152a2de250b360ee5e0c76d41931271b43af9c28054f42d35f274178508c47d7
|
| 3 |
+
size 13723791
|
examples/count.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/python3
|
| 2 |
+
# -*- coding: utf-8 -*-
|
| 3 |
+
import argparse
|
| 4 |
+
from collections import defaultdict
|
| 5 |
+
import logging
|
| 6 |
+
import os
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
import sys
|
| 9 |
+
|
| 10 |
+
pwd = os.path.abspath(os.path.dirname(__file__))
|
| 11 |
+
sys.path.append(os.path.join(pwd, "../../"))
|
| 12 |
+
|
| 13 |
+
from tqdm import tqdm
|
| 14 |
+
|
| 15 |
+
logger = logging.getLogger("main")
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def get_args():
|
| 19 |
+
parser = argparse.ArgumentParser()
|
| 20 |
+
parser.add_argument(
|
| 21 |
+
"--src_dir",
|
| 22 |
+
# default=(project_path / f"data/raw").as_posix(),
|
| 23 |
+
# default=r"D:\Users\tianx\HuggingDatasets\international_voice\data\sea-idn\audio_lib_hkg_1\audio_lib_hkg_1",
|
| 24 |
+
# default=r"D:\Users\tianx\HuggingDatasets\international_voice\data\sea-idn\audio_lib_hkg_1\sea-bra-mex-audio-lib-20250923-24\audio_lib\pt-BR",
|
| 25 |
+
default=r"D:\Users\tianx\HuggingDatasets\calling_analysis\data\ko-KR",
|
| 26 |
+
# default=r"D:\Users\tianx\HuggingDatasets\international_voice\data\sea-idn\audio_lib_hkg_1\sea-bra-mex-audio-lib-20250923-24\audio_lib\es-MX",
|
| 27 |
+
type=str
|
| 28 |
+
)
|
| 29 |
+
args = parser.parse_args()
|
| 30 |
+
return args
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def main():
|
| 34 |
+
args = get_args()
|
| 35 |
+
|
| 36 |
+
src_dir = Path(args.src_dir)
|
| 37 |
+
print(src_dir)
|
| 38 |
+
|
| 39 |
+
process_bar = tqdm(desc="count")
|
| 40 |
+
counter = defaultdict(int)
|
| 41 |
+
for wav_dir in src_dir.glob("*"):
|
| 42 |
+
language = wav_dir.parts[-1]
|
| 43 |
+
for _ in wav_dir.glob("**/active_media_r_*.wav"):
|
| 44 |
+
counter[language] += 1
|
| 45 |
+
|
| 46 |
+
process_bar.update(n=1)
|
| 47 |
+
process_bar.set_postfix({
|
| 48 |
+
**dict(counter)
|
| 49 |
+
})
|
| 50 |
+
|
| 51 |
+
connected_count = 0
|
| 52 |
+
for k, v in counter.items():
|
| 53 |
+
print(f"{k}: {v}, {v}%")
|
| 54 |
+
|
| 55 |
+
if not k.endswith("not_connected"):
|
| 56 |
+
connected_count += v
|
| 57 |
+
print(f"connected_count: {connected_count}")
|
| 58 |
+
return
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
if __name__ == "__main__":
|
| 62 |
+
main()
|
examples/make_test_audios.py
CHANGED
|
@@ -14,13 +14,13 @@ def get_args():
|
|
| 14 |
parser = argparse.ArgumentParser()
|
| 15 |
parser.add_argument(
|
| 16 |
"--audio_dir",
|
| 17 |
-
default=(project_path / "data/
|
| 18 |
# default=(project_path / "data/pt-BR").as_posix(),
|
| 19 |
type=str
|
| 20 |
)
|
| 21 |
parser.add_argument(
|
| 22 |
"--output_dir",
|
| 23 |
-
default=(project_path / "data/
|
| 24 |
# default=(project_path / "data/55").as_posix(),
|
| 25 |
type=str
|
| 26 |
)
|
|
@@ -28,7 +28,7 @@ def get_args():
|
|
| 28 |
return args
|
| 29 |
|
| 30 |
|
| 31 |
-
|
| 32 |
bell_and_mute: 2, 2%
|
| 33 |
bell_and_mute_1_second_then_voicemail: 1, 1%
|
| 34 |
bell_and_not_connected: 17, 17%
|
|
@@ -71,6 +71,23 @@ unable_to_complete_this_call: 1, 1%
|
|
| 71 |
"""
|
| 72 |
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
def main():
|
| 75 |
args = get_args()
|
| 76 |
audio_dir = Path(args.audio_dir)
|
|
|
|
| 14 |
parser = argparse.ArgumentParser()
|
| 15 |
parser.add_argument(
|
| 16 |
"--audio_dir",
|
| 17 |
+
default=(project_path / "data/ko-KR").as_posix(),
|
| 18 |
# default=(project_path / "data/pt-BR").as_posix(),
|
| 19 |
type=str
|
| 20 |
)
|
| 21 |
parser.add_argument(
|
| 22 |
"--output_dir",
|
| 23 |
+
default=(project_path / "data/82").as_posix(),
|
| 24 |
# default=(project_path / "data/55").as_posix(),
|
| 25 |
type=str
|
| 26 |
)
|
|
|
|
| 28 |
return args
|
| 29 |
|
| 30 |
|
| 31 |
+
quantity_to_use1 = """
|
| 32 |
bell_and_mute: 2, 2%
|
| 33 |
bell_and_mute_1_second_then_voicemail: 1, 1%
|
| 34 |
bell_and_not_connected: 17, 17%
|
|
|
|
| 71 |
"""
|
| 72 |
|
| 73 |
|
| 74 |
+
quantity_to_use = """
|
| 75 |
+
bell_and_mute: 2, 2%
|
| 76 |
+
bell_and_noise_mute: 4, 4%
|
| 77 |
+
bell_and_not_connected: 27, 27%
|
| 78 |
+
bell_and_voice: 5, 5%
|
| 79 |
+
bell_and_voicemail: 3, 3%
|
| 80 |
+
early_media_voicemail_and_voicemail: 7, 7%
|
| 81 |
+
invalid_number_and_not_connected: 1, 1%
|
| 82 |
+
music_and_mute: 1, 1%
|
| 83 |
+
music_and_noise_mute: 1, 1%
|
| 84 |
+
mute_and_not_connected: 2, 2%
|
| 85 |
+
no_answer_and_mute: 1, 1%
|
| 86 |
+
no_answer_and_not_connected: 45, 45%
|
| 87 |
+
suspended_and_not_connected: 1, 1%
|
| 88 |
+
"""
|
| 89 |
+
|
| 90 |
+
|
| 91 |
def main():
|
| 92 |
args = get_args()
|
| 93 |
audio_dir = Path(args.audio_dir)
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
python-dotenv==1.0.1
|
| 2 |
pandas
|
| 3 |
openpyxl
|
|
|
|
|
|
| 1 |
python-dotenv==1.0.1
|
| 2 |
pandas
|
| 3 |
openpyxl
|
| 4 |
+
tqdm
|