{ "cells": [ { "attachments": {}, "cell_type": "markdown", "id": "6cfd2a8c-fdfc-4233-abd1-ece097069522", "metadata": {}, "source": [ "# __오디오 파일을 받아쓰는 음성 인식 모델 만들기__" ] }, { "attachments": {}, "cell_type": "markdown", "id": "c0c52c4a-aec4-45e9-88eb-7225e03a6b4b", "metadata": {}, "source": [ "- 튜토리얼 난이도: ★☆☆☆☆\n", "- 읽는데 걸리는 시간: 10분\n", "- 사용 언어: [SQL](https://ko.wikipedia.org/wiki/SQL) (100%)\n", "- 실행 파일 위치: tutorial/thanosql_ml/audio_recognition/speech_recognition.ipynb\n", "- 참고 문서: [LibriSpeech 데이터 세트](http://www.openslr.org/12), [wav2vec 2.0: A Framework for Self-Supervised Learning of Speech Representations](https://arxiv.org/abs/2006.11477)" ] }, { "attachments": {}, "cell_type": "markdown", "id": "78e7b326-4786-4fd2-a801-d22aff1ddb3d", "metadata": {}, "source": [ "## 튜토리얼 소개\n", "\n", "
컴퓨터 음성 인식 또는 음성-텍스트 변환(Speech-to-Text)이라고도 부르는 음성 인식 기술은 프로그램이 사람의 음성을 텍스트 형식으로 처리할 수 있도록 해줍니다. 최근 자동차, 의료 분야, 인공지능 스피커나 스마트폰을 이용한 일상 생활까지 광범위한 분야에서 활용되고 있습니다. 최근 머신러닝(기계학습/Machine Learning) 알고리즘을 활용한 음성 인식 기술은 문법, 구문, 구조, 오디오와 음성 신호의 구성을 통합하여 음성을 이해하고 처리합니다.
\n", "일반적으로 음성 인식(Voice Recognition)과 혼동 될 수 있는데, 음성 인식은 개별 사용자의 목소리를 식별하는 데만 집중합니다.
\n", "👉 Librispeech [Panayotov et al. 2015]는 음성인식 연구에 있어서 가장 널리 사용되는 대규모 영어 음성 데이터 중 하나로 사용자 참여형 오디오북 프로젝트인 LibriVox project의 결과물입니다. 16kHz로 샘플링된 약 1,000시간 분량의 녹음된 오디오북 데이터를 가공하여 만들었습니다. 튜토리얼을 위한 대상 테이블은 미리 업로드 된 음성 파일의 경로와 스크립트로 구성되어 있습니다. 본 튜토리얼은 음성 파일을 텍스트로 변환하는 것을 목표로 하고 있습니다.
\n", "\n", " | audio_path | \n", "text | \n", "
---|---|---|
0 | \n", "thanosql-dataset/librispeech_data/000.wav | \n", "i noticed how white and well shaped his own ha... | \n", "
1 | \n", "thanosql-dataset/librispeech_data/001.wav | \n", "the only conflicts that occurred on irish soil... | \n", "
2 | \n", "thanosql-dataset/librispeech_data/002.wav | \n", "inquired shaggy in the metal forest | \n", "
3 | \n", "thanosql-dataset/librispeech_data/003.wav | \n", "my grandmother always spoke in a very loud ton... | \n", "
4 | \n", "thanosql-dataset/librispeech_data/004.wav | \n", "the poets of succeeding ages have dwelt much i... | \n", "
librispeech_train 테이블은 아래와 같은 정보를 담고 있습니다.
\n", "\n", " | audio_path | \n", "text | \n", "predict_result | \n", "
---|---|---|---|
0 | \n", "thanosql-dataset/librispeech_data/000.wav | \n", "i noticed how white and well shaped his own ha... | \n", "I NOTICED HOW WHITE AND WELL SHAPED HIS OWN HA... | \n", "
1 | \n", "thanosql-dataset/librispeech_data/001.wav | \n", "the only conflicts that occurred on irish soil... | \n", "THE ONLY CONFLICTS THAT OCCURRED ON IRISH SOIL... | \n", "
2 | \n", "thanosql-dataset/librispeech_data/002.wav | \n", "inquired shaggy in the metal forest | \n", "INQUIRED SHAGGY IN THE MEDAL FOREST | \n", "
3 | \n", "thanosql-dataset/librispeech_data/003.wav | \n", "my grandmother always spoke in a very loud ton... | \n", "MY GRANDMOTHER ALWAYS SPOKE IN A VERY LOUD TON... | \n", "
4 | \n", "thanosql-dataset/librispeech_data/004.wav | \n", "the poets of succeeding ages have dwelt much i... | \n", "THE POETS OF SUCCEEDING AGES HAVE DWELT MUCH I... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "
75 | \n", "thanosql-dataset/librispeech_data/075.wav | \n", "we can't do anything without evidence complain | \n", "WE CAN'T DO ANYTHING WITHOUT EVIDENCE COMPLAIN | \n", "
76 | \n", "thanosql-dataset/librispeech_data/076.wav | \n", "when i came up he touched my shoulder and look... | \n", "WHEN I CAME UP HE TOUCHED MY SHOULDER AND LOOK... | \n", "
77 | \n", "thanosql-dataset/librispeech_data/077.wav | \n", "it relieved him for a while | \n", "IT RELIEVED HIM FOR A WHILE | \n", "
78 | \n", "thanosql-dataset/librispeech_data/078.wav | \n", "this world's thick vapours whelm your eyes unw... | \n", "THIS WORLD'S THICK VAPOURS WHELM YOUR EYES UNW... | \n", "
79 | \n", "thanosql-dataset/librispeech_data/079.wav | \n", "i began to enjoy the exhilarating delight of t... | \n", "I BEGAN TO ENJOY THE EXHILARATING DELIGHT OF T... | \n", "
80 rows × 3 columns
\n", "여기서는 빠르게 학습하기 위해 \"max_epochs\"를 1로 지정했습니다. 일반적으로 숫자가 클수록 많은 계산 시간이 소요되지만 학습이 진행됨에 따라 예측 성능이 올라갑니다.
\n", "\n", " | audio_path | \n", "text | \n", "predict_result | \n", "
---|---|---|---|
0 | \n", "thanosql-dataset/librispeech_data/080.wav | \n", "dead said doctor macklewain | \n", "DEAD SAID DOCTOR MACKELWAINE | \n", "
1 | \n", "thanosql-dataset/librispeech_data/081.wav | \n", "one day when i rode over to the shimerdas i fo... | \n", "ONE DAY WHEN I RODE OVER TO THE SHIMERIDASI FO... | \n", "
2 | \n", "thanosql-dataset/librispeech_data/082.wav | \n", "well i don't think you should turn a guy's t v... | \n", "WELL I DON'T THINK YOU SHOULD TURN A GUYSE TEE... | \n", "
3 | \n", "thanosql-dataset/librispeech_data/083.wav | \n", "and what allurements or what vantages upon the... | \n", "AND WHAT ALLUREMENTS OR WHAT VANTAGES UPON THE... | \n", "
4 | \n", "thanosql-dataset/librispeech_data/084.wav | \n", "yes how many | \n", "YE S HOW MANY | \n", "
5 | \n", "thanosql-dataset/librispeech_data/085.wav | \n", "then i look perhaps like what i am | \n", "THEN I LOOK PERHAPS LIKE WHAT I AM | \n", "
6 | \n", "thanosql-dataset/librispeech_data/086.wav | \n", "i'm mister christopher from london | \n", "I MISTER CHRISTOPHER FROM LONDON | \n", "
7 | \n", "thanosql-dataset/librispeech_data/087.wav | \n", "nature a difference of fifty years had set a p... | \n", "NATUREA DIFFERENCE OF FIFTY YEARSHAD SET A PRO... | \n", "
8 | \n", "thanosql-dataset/librispeech_data/088.wav | \n", "he is just married you know is he said burgess | \n", "HE IS JUST MARRIED YOU KNOWIS HE SAID BURGES | \n", "
9 | \n", "thanosql-dataset/librispeech_data/089.wav | \n", "she pointed into the gold cottonwood tree behi... | \n", "SHE POINTED IN TO THE GOLD COTTON WOOD TREE BE... | \n", "
10 | \n", "thanosql-dataset/librispeech_data/090.wav | \n", "and she saw the other birds hopping about and ... | \n", "AND SHE SAW ALL THE OTHER BIRDS HOPPING ABOUT ... | \n", "
11 | \n", "thanosql-dataset/librispeech_data/091.wav | \n", "always but it's worse now | \n", "ALWAYS BUT IT'S WORSE NOW | \n", "
12 | \n", "thanosql-dataset/librispeech_data/092.wav | \n", "week followed week these two beings led a happ... | \n", "WEEK FOLLOWED WEEK THESE TWO BEINGSLED A HAPPY... | \n", "
13 | \n", "thanosql-dataset/librispeech_data/093.wav | \n", "gwynplaine was a mountebank | \n", "GWYNPLAINE WAS A MOUNTE BANK | \n", "
14 | \n", "thanosql-dataset/librispeech_data/094.wav | \n", "the coals in the grate settled down with a sli... | \n", "THE COALS IN THE GRATE SETTLED DOWN WITH A SLI... | \n", "
15 | \n", "thanosql-dataset/librispeech_data/095.wav | \n", "i've decided to enlist in the army | \n", "I'VE DECIDED TO ENLIST IN THE ARMY | \n", "
16 | \n", "thanosql-dataset/librispeech_data/096.wav | \n", "i also offered to help your brother to escape ... | \n", "I ALSO OFFERED TO HELP YOUR BRO THER TO ESCAPE... | \n", "
17 | \n", "thanosql-dataset/librispeech_data/097.wav | \n", "well now said meekin with asperity i don't agr... | \n", "WELL NOW SAID MIKON WITH ASPERITYI DON'T AGREE... | \n", "
18 | \n", "thanosql-dataset/librispeech_data/098.wav | \n", "little did i expect however the spectacle whic... | \n", "LITTLE DID I EXPECT HOWEVERTHE SPECTACLE WHICH... | \n", "
19 | \n", "thanosql-dataset/librispeech_data/099.wav | \n", "i look at my watch it's a quarter to eleven | \n", "A LOOK AT MY WATCHIT'S A QUARTER TO ELEVEN | \n", "
ThanoSQL을 활용해 나만의 모델을 만들거나, 나의 서비스에 적용하는데 어려움이 있다면 언제든 아래로 문의주세요😊
\n", "음성 인식 모델 구축 관련 문의: contact@smartmind.team
\n", "