Datasets:
Size:
10K<n<100K
License:
feat(readme): added error handler for the case of missing music-tag library, updated readme
Browse files- README.md +75 -0
- baneks-speech.py +10 -12
README.md
CHANGED
@@ -1,3 +1,78 @@
|
|
1 |
---
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- ru
|
4 |
+
- en
|
5 |
license: apache-2.0
|
6 |
+
tags:
|
7 |
+
- not-for-all-audiences
|
8 |
+
- art
|
9 |
+
- humour
|
10 |
+
- jokes
|
11 |
+
annotation_creators:
|
12 |
+
- crowdsourced
|
13 |
+
- original
|
14 |
+
- machine-generated
|
15 |
+
language_creators:
|
16 |
+
- crowdsourced
|
17 |
+
- original
|
18 |
+
- machine-generated
|
19 |
+
pretty_name: baneks-speech
|
20 |
+
size_categories:
|
21 |
+
- 10K<n<100K
|
22 |
+
task_categories:
|
23 |
+
- text-to-speech
|
24 |
+
- automatic-speech-recognition
|
25 |
---
|
26 |
+
|
27 |
+
# Dataset card for baneks-speech
|
28 |
+
|
29 |
+
## Table of contents
|
30 |
+
|
31 |
+
- [Dataset description](#dataset-description)
|
32 |
+
- [Dataset summary](#dataset-summary)
|
33 |
+
- [Dataset structure](#dataset-structure)
|
34 |
+
- [Dataset instance](#dataset-instance)
|
35 |
+
- [Dataset fields](#dataset-fields)
|
36 |
+
|
37 |
+
## Dataset description
|
38 |
+
|
39 |
+
- **Homepage:** [baneks-speech homepage]()
|
40 |
+
- **Repository:** [baneks-speech repository](https://huggingface.co/datasets/zeio/baneks-speech)
|
41 |
+
- **Point of contact:** [Zeio Nara](mailto:zeionara@gmail.com)
|
42 |
+
- **Dataset version:** `10.10.2023`
|
43 |
+
|
44 |
+
### Dataset summary
|
45 |
+
|
46 |
+
This dataset contains speech generated for anekdotes parsed from a few vk social network communities using [stc model](https://cloud.speechpro.com/home).
|
47 |
+
The dataset corresponds to the **default** configuration from the [baneks](https://huggingface.co/datasets/zeio/baneks) dataset.
|
48 |
+
Since the dataset is regularly updated, there is no fixed number of entries, so stay tuned.
|
49 |
+
|
50 |
+
## Dataset structure
|
51 |
+
|
52 |
+
### Data instance
|
53 |
+
|
54 |
+
An example of an entry from the dataset is given below:
|
55 |
+
|
56 |
+
```json
|
57 |
+
{
|
58 |
+
'text': 'Сидят русский и казах Русский спрашивает: - Слушай, а у тебя жена есть? - Жок - Молодец! Я бы свою тоже сжег нахуй!',
|
59 |
+
'audio': {
|
60 |
+
'path': '/root/.cache/huggingface/datasets/downloads/extracted/e8abea39e83c61e4a60c5a4b0661dc044ae82cfcd84b26f966b87999f73ae92e/00476018.anekdotikategoriib.mp3',
|
61 |
+
'array': array([ 8.09500818e-07, 1.27653129e-06, 4.17583010e-07, ..., -8.52341486e-07, 9.19626189e-07, 1.67368569e-06]),
|
62 |
+
'sampling_rate': 22050
|
63 |
+
},
|
64 |
+
'artist': 'Vladimir_n',
|
65 |
+
'id': 476018,
|
66 |
+
'source': 'anekdotikategoriib'
|
67 |
+
}
|
68 |
+
```
|
69 |
+
|
70 |
+
### Data fields
|
71 |
+
|
72 |
+
Each dataset entry therefore consists of the following fields:
|
73 |
+
|
74 |
+
- `text` - text representation of the anecdote;
|
75 |
+
- `id` - id of the corresponding post;
|
76 |
+
- `source` - community name in which the corresponding post has been published;
|
77 |
+
- `artist` - identifier of the voice which was used for speech generation;
|
78 |
+
- `audio` - audio data read from an `mp3` file.
|
baneks-speech.py
CHANGED
@@ -5,10 +5,10 @@ from pathlib import Path
|
|
5 |
import datasets
|
6 |
from datasets import Features, Value, Audio
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
_DESCRIPTION = """
|
14 |
This dataset contains speech generated for anecdotes from the [baneks dataset](https://huggingface.co/datasets/zeio/baneks)
|
@@ -21,7 +21,7 @@ _LICENSE = "Apache License Version 2.0"
|
|
21 |
_URL = "https://huggingface.co/datasets/zeio/baneks-speech/resolve/main/speech/{first:06d}-{last:06d}.tar.xz"
|
22 |
|
23 |
|
24 |
-
_N_TOTAL =
|
25 |
_N_BATCH = 1_000
|
26 |
|
27 |
|
@@ -56,7 +56,7 @@ class BaneksSpeech(datasets.GeneratorBasedBuilder):
|
|
56 |
|
57 |
paths.append(dl_manager.download_and_extract(url))
|
58 |
|
59 |
-
break
|
60 |
|
61 |
return [
|
62 |
datasets.SplitGenerator(
|
@@ -77,12 +77,10 @@ class BaneksSpeech(datasets.GeneratorBasedBuilder):
|
|
77 |
id_ = int(components[0])
|
78 |
source = components[1]
|
79 |
|
80 |
-
meta =
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
# print(id_, source, artist, text)
|
86 |
|
87 |
yield f'{id_:08d}-{source}', {
|
88 |
'text': meta['lyrics'],
|
|
|
5 |
import datasets
|
6 |
from datasets import Features, Value, Audio
|
7 |
|
8 |
+
try:
|
9 |
+
from music_tag import load_file
|
10 |
+
except Exception:
|
11 |
+
load_file = None
|
12 |
|
13 |
_DESCRIPTION = """
|
14 |
This dataset contains speech generated for anecdotes from the [baneks dataset](https://huggingface.co/datasets/zeio/baneks)
|
|
|
21 |
_URL = "https://huggingface.co/datasets/zeio/baneks-speech/resolve/main/speech/{first:06d}-{last:06d}.tar.xz"
|
22 |
|
23 |
|
24 |
+
_N_TOTAL = 39_536
|
25 |
_N_BATCH = 1_000
|
26 |
|
27 |
|
|
|
56 |
|
57 |
paths.append(dl_manager.download_and_extract(url))
|
58 |
|
59 |
+
# break # uncomment this line to download only first partition of the dataset which weighs approximately 70 Mb
|
60 |
|
61 |
return [
|
62 |
datasets.SplitGenerator(
|
|
|
77 |
id_ = int(components[0])
|
78 |
source = components[1]
|
79 |
|
80 |
+
meta = {
|
81 |
+
'lyrics': 'Here will be lyrics which are loaded from the mp3 file metadata',
|
82 |
+
'artist': 'Here will be artist which is loaded from the mp3 file metadata'
|
83 |
+
} if load_file is None else load_file(file)
|
|
|
|
|
84 |
|
85 |
yield f'{id_:08d}-{source}', {
|
86 |
'text': meta['lyrics'],
|