File size: 2,557 Bytes
b0ae254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from datasets import load_dataset"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Downloading data files:   0%|          | 0/1 [06:36<?, ?it/s]\n",
      "Downloading data:  64%|██████▍   | 252M/392M [05:05<02:50, 823kB/s] \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'audio': {'path': None, 'array': array([0.0010376 , 0.00164795, 0.00180054, ..., 0.00109863, 0.00143433,\n",
      "       0.        ]), 'sampling_rate': 16000}, 'sentence': 'I. Siihen aikaan, kun isä lampun osti, sanoi hän äidille näinikään: --Äiti hoi, kuulehan,--'}\n"
     ]
    }
   ],
   "source": [
    "css_10 = load_dataset(\"Finnish-NLP/css10_audio_processed\", split='train', streaming=True)\n",
    "print(next(iter(css_10)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'id': 110, 'num_samples': 216000, 'path': None, 'audio': {'path': 'train/1001766524179559127.wav', 'array': array([0.        , 0.        , 0.        , ..., 0.00033885, 0.00047046,\n",
      "       0.00032645]), 'sampling_rate': 16000}, 'transcription': 'kapseli liikkuu noin 12,8 kilometrin eli 8 mailin sekuntivauhdilla riittävän nopeasti mennäkseen san franciscosta los angelesiin yhdessä minuutissa', 'raw_transcription': 'Kapseli liikkuu noin 12,8 kilometrin eli 8 mailin sekuntivauhdilla – riittävän nopeasti mennäkseen San Franciscosta Los Angelesiin yhdessä minuutissa.', 'gender': 1, 'lang_id': 24, 'language': 'Finnish', 'lang_group_id': 0}\n"
     ]
    }
   ],
   "source": [
    "from datasets import load_dataset\n",
    "fleurs = load_dataset(\"google/fleurs\", \"fi_fi\", split=\"train\", streaming=True)\n",
    "print(next(iter(fleurs)))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "WhisperFinetuneEnv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.13"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}