|
45 | 45 | }, |
46 | 46 | { |
47 | 47 | "cell_type": "code", |
48 | | - "execution_count": 0, |
| 48 | + "execution_count": null, |
49 | 49 | "metadata": { |
50 | 50 | "colab_type": "code" |
51 | 51 | }, |
|
65 | 65 | }, |
66 | 66 | { |
67 | 67 | "cell_type": "code", |
68 | | - "execution_count": 0, |
| 68 | + "execution_count": null, |
69 | 69 | "metadata": { |
70 | 70 | "colab_type": "code" |
71 | 71 | }, |
|
136 | 136 | }, |
137 | 137 | { |
138 | 138 | "cell_type": "code", |
139 | | - "execution_count": 0, |
| 139 | + "execution_count": null, |
140 | 140 | "metadata": { |
141 | 141 | "colab_type": "code" |
142 | 142 | }, |
|
189 | 189 | }, |
190 | 190 | { |
191 | 191 | "cell_type": "code", |
192 | | - "execution_count": 0, |
| 192 | + "execution_count": null, |
193 | 193 | "metadata": { |
194 | 194 | "colab_type": "code" |
195 | 195 | }, |
|
228 | 228 | }, |
229 | 229 | { |
230 | 230 | "cell_type": "code", |
231 | | - "execution_count": 0, |
| 231 | + "execution_count": null, |
232 | 232 | "metadata": { |
233 | 233 | "colab_type": "code" |
234 | 234 | }, |
|
265 | 265 | }, |
266 | 266 | { |
267 | 267 | "cell_type": "code", |
268 | | - "execution_count": 0, |
| 268 | + "execution_count": null, |
269 | 269 | "metadata": { |
270 | 270 | "colab_type": "code" |
271 | 271 | }, |
|
294 | 294 | }, |
295 | 295 | { |
296 | 296 | "cell_type": "code", |
297 | | - "execution_count": 0, |
| 297 | + "execution_count": null, |
298 | 298 | "metadata": { |
299 | 299 | "colab_type": "code" |
300 | 300 | }, |
|
344 | 344 | }, |
345 | 345 | { |
346 | 346 | "cell_type": "code", |
347 | | - "execution_count": 0, |
| 347 | + "execution_count": null, |
348 | 348 | "metadata": { |
349 | 349 | "colab_type": "code" |
350 | 350 | }, |
|
390 | 390 | }, |
391 | 391 | { |
392 | 392 | "cell_type": "code", |
393 | | - "execution_count": 0, |
| 393 | + "execution_count": null, |
394 | 394 | "metadata": { |
395 | 395 | "colab_type": "code" |
396 | 396 | }, |
|
471 | 471 | }, |
472 | 472 | { |
473 | 473 | "cell_type": "code", |
474 | | - "execution_count": 0, |
| 474 | + "execution_count": null, |
475 | 475 | "metadata": { |
476 | 476 | "colab_type": "code" |
477 | 477 | }, |
|
522 | 522 | "source": [ |
523 | 523 | "## Class weights calculation\n", |
524 | 524 | "\n", |
525 | | - "Since the dataset is quite unbalanced, we wil use `class_weight` argument during training.\n", |
| 525 | + "Since the dataset is quite unbalanced, we will use `class_weight` argument during training.\n", |
526 | 526 | "\n", |
527 | 527 | "Getting the class weights is a little tricky because even though we know the number of\n", |
528 | 528 | "audio files for each class, it does not represent the number of samples for that class\n", |
|
535 | 535 | }, |
536 | 536 | { |
537 | 537 | "cell_type": "code", |
538 | | - "execution_count": 0, |
| 538 | + "execution_count": null, |
539 | 539 | "metadata": { |
540 | 540 | "colab_type": "code" |
541 | 541 | }, |
|
573 | 573 | }, |
574 | 574 | { |
575 | 575 | "cell_type": "code", |
576 | | - "execution_count": 0, |
| 576 | + "execution_count": null, |
577 | 577 | "metadata": { |
578 | 578 | "colab_type": "code" |
579 | 579 | }, |
|
605 | 605 | }, |
606 | 606 | { |
607 | 607 | "cell_type": "code", |
608 | | - "execution_count": 0, |
| 608 | + "execution_count": null, |
609 | 609 | "metadata": { |
610 | 610 | "colab_type": "code" |
611 | 611 | }, |
|
634 | 634 | }, |
635 | 635 | { |
636 | 636 | "cell_type": "code", |
637 | | - "execution_count": 0, |
| 637 | + "execution_count": null, |
638 | 638 | "metadata": { |
639 | 639 | "colab_type": "code" |
640 | 640 | }, |
|
670 | 670 | }, |
671 | 671 | { |
672 | 672 | "cell_type": "code", |
673 | | - "execution_count": 0, |
| 673 | + "execution_count": null, |
674 | 674 | "metadata": { |
675 | 675 | "colab_type": "code" |
676 | 676 | }, |
|
693 | 693 | }, |
694 | 694 | { |
695 | 695 | "cell_type": "code", |
696 | | - "execution_count": 0, |
| 696 | + "execution_count": null, |
697 | 697 | "metadata": { |
698 | 698 | "colab_type": "code" |
699 | 699 | }, |
|
746 | 746 | }, |
747 | 747 | { |
748 | 748 | "cell_type": "code", |
749 | | - "execution_count": 0, |
| 749 | + "execution_count": null, |
750 | 750 | "metadata": { |
751 | 751 | "colab_type": "code" |
752 | 752 | }, |
|
803 | 803 | }, |
804 | 804 | { |
805 | 805 | "cell_type": "code", |
806 | | - "execution_count": 0, |
| 806 | + "execution_count": null, |
807 | 807 | "metadata": { |
808 | 808 | "colab_type": "code" |
809 | 809 | }, |
|
840 | 840 | }, |
841 | 841 | { |
842 | 842 | "cell_type": "code", |
843 | | - "execution_count": 0, |
| 843 | + "execution_count": null, |
844 | 844 | "metadata": { |
845 | 845 | "colab_type": "code" |
846 | 846 | }, |
|
861 | 861 | " )\n", |
862 | 862 | " os.system(command)\n", |
863 | 863 | "\n", |
864 | | - "filename = filename + \".wav\"\n", |
865 | | - "" |
| 864 | + "filename = filename + \".wav\"\n" |
866 | 865 | ] |
867 | 866 | }, |
868 | 867 | { |
|
877 | 876 | }, |
878 | 877 | { |
879 | 878 | "cell_type": "code", |
880 | | - "execution_count": 0, |
| 879 | + "execution_count": null, |
881 | 880 | "metadata": { |
882 | 881 | "colab_type": "code" |
883 | 882 | }, |
|
924 | 923 | " # Predict the output of the accent recognition model with embeddings as input\n", |
925 | 924 | " predictions = model.predict(embeddings)\n", |
926 | 925 | "\n", |
927 | | - " return audio_wav, predictions, mel_spectrogram\n", |
928 | | - "" |
| 926 | + " return audio_wav, predictions, mel_spectrogram\n" |
929 | 927 | ] |
930 | 928 | }, |
931 | 929 | { |
|
939 | 937 | }, |
940 | 938 | { |
941 | 939 | "cell_type": "code", |
942 | | - "execution_count": 0, |
| 940 | + "execution_count": null, |
943 | 941 | "metadata": { |
944 | 942 | "colab_type": "code" |
945 | 943 | }, |
|
962 | 960 | }, |
963 | 961 | { |
964 | 962 | "cell_type": "code", |
965 | | - "execution_count": 0, |
| 963 | + "execution_count": null, |
966 | 964 | "metadata": { |
967 | 965 | "colab_type": "code" |
968 | 966 | }, |
|
988 | 986 | }, |
989 | 987 | { |
990 | 988 | "cell_type": "code", |
991 | | - "execution_count": 0, |
| 989 | + "execution_count": null, |
992 | 990 | "metadata": { |
993 | 991 | "colab_type": "code" |
994 | 992 | }, |
|
0 commit comments