Kaldi๋ ์๋ ์์ฑ ์ธ์(ASR, Automatic Speech Recognition) ์์คํ ์ ๊ฐ๋ฐํ๋ ๋ฐ ํ์ํ ์๊ณ ๋ฆฌ์ฆ, ๋ชจ๋ธ, ํด์ ์ ๊ณตํ๋ ์คํ์์ค ์ํํธ์จ์ด ํดํท์ด๋ค.
Kaldi ASR
Kaldi's code lives at https://github.com/kaldi-asr/kaldi. To checkout (i.e. clone in the git terminology) the most recent changes, you can use this command git clone https://github.com/kaldi-asr/kaldi or follow the github link and click "Download in zip" o
kaldi-asr.org
Kaldi๋ ๊ณ ์ฑ๋ฅ, ์ ์ฐ์ฑ ๋์ ์์ฑ ์ธ์ ๊ฐ๋ฐ ๋๊ตฌ๋ก, ๋ณต์กํ ASR ์์คํ ๋ถํฐ ์ต์ ๋ฅ๋ฌ๋ ๊ธฐ๋ฐ ๋ชจ๋ธ๊น์ง ์ฐ๊ตฌ ๋ฐ ์ฐ์ ์ ์ฉ์ด ๊ฐ๋ฅํ ๊ฐ๋ ฅํ ์คํ์์ค ํ๋ซํผ์ด๋ค.
Kaldi์ ํน์ง
- ์ต์ ์์ฑ ์ธ์ ์๊ณ ๋ฆฌ์ฆ ์ง์ : ๋ฅ๋ฌ๋ ๊ธฐ๋ฐ, HMM-DNN ํ์ด๋ธ๋ฆฌ๋, TDNN, LSTM, Transformer ๋ฑ
- Feature Extraction : MFCC, fbank, pitch ๋ฑ ๋ค์ํ ์ํฅ ํน์ง ์ถ์ถ ์ง์
- Training & Decoding : GMM, DNN, TDNN, LSTM ๊ธฐ๋ฐ ๋ชจ๋ธ์ ํ์ต ๋ฐ ๋์ฝ๋ฉ
- ์ํฅ ๋ชจ๋ธ (Acoustic Model) : ๋ค์ํ ๋ชจ๋ธ๋ก ์์ฑ์ ๋ฒกํฐํํ์ฌ ์ธ์ ๊ฐ๋ฅ
- ์ธ์ด ๋ชจ๋ธ (Language Model) : n-gram, RNNLM ์ฐ๋ ๊ฐ๋ฅ
- ๊ทธ๋ํ ๊ธฐ๋ฐ ๋์ฝ๋ฉ (WFST) : Weighted Finite-State Transducer๋ฅผ ์ด์ฉํ ๊ฐ๋ ฅํ ๊ฒ์๊ณผ ๋์ฝ๋ฉ
- ๋ฉํฐ์คํผ์ปค/๋ค๊ตญ์ด ์ง์ : ๋ค์ํ ์ธ์ด ๋ฐ ๋ฐํ์์ ๋์ ๊ฐ๋ฅํ ์์คํ ๊ตฌ์ถ
- End-to-End ์์คํ ์ฐ๋ : ์ต๊ทผ Transformer, Attention ๊ธฐ๋ฐ ๋ชจ๋ธ๋ ์ฐ๊ตฌ ์ ์ฉ ๊ฐ๋ฅ
Kaldi์ ๊ตฌ์ฑ (Architecture)
๊ตฌ์ฑ ์์ | ์ญํ |
Feature Extraction | ์์ฑ ์ ํธ → ํน์ฑ(MFCC, filterbank ๋ฑ) ๋ณํ |
Acoustic Model | ์์ฑ ํน์ง → ์์(phoneme), ๋จ์ด ํ๋ฅ ์์ธก |
Lexicon | ๋ฐ์ ์ฌ์ , ๋จ์ด → ๋ฐ์์ผ๋ก ๋งคํ |
Language Model | ๋ฌธ์ฅ ๊ตฌ์ฑ์ ํ๋ฅ ๋ชจ๋ธ (n-gram, RNN ๋ฑ) |
Decoder | ๊ทธ๋ํ(WFST) ๊ธฐ๋ฐ์ผ๋ก ์์ฑ ๋ฐ์ดํฐ๋ฅผ ๋ฌธ์ฅ์ผ๋ก ๋ณํ |
Kaldi์ ํ์ต ๋ฐ ์ธ์ ํ์ดํ๋ผ์ธ
[์์ฑ ๋ฐ์ดํฐ] → [Feature Extraction] → [Acoustic Model Training]
↓
[Decoding Graph (WFST)] ← [Language Model + Lexicon]
↓
[Decoding (์์ฑ → ํ
์คํธ)]
์์ ์ํฌํ๋ก์ฐ
- ๋ฐ์ดํฐ ์ค๋น (Data preparation)
- ํน์ง ์ถ์ถ (Feature extraction)
- ์ํฅ ๋ชจ๋ธ ํ์ต (Acoustic model training)
- ๋์ฝ๋ฉ ๊ทธ๋ํ ์ค๋น (Graph preparation)
- ๋์ฝ๋ฉ (Decoding)
- ๊ฒฐ๊ณผ ํ๊ฐ (Evaluation)
Kaldi์ ์ฅ์ ๊ณผ ๋จ์
์ฅ์ | ๋จ์ |
๋งค์ฐ ๊ฐ๋ ฅํ๊ณ ์ ์ฐํ ์์ฑ ์ธ์ ์์คํ ๊ฐ๋ฐ ๊ฐ๋ฅ | ๋ณต์กํ ์ค์ ๋ฐ ๋์ ํ์ต ๋์ด๋ |
๋ค์ํ ์ต์ ์ํฅ ๋ชจ๋ธ๊ณผ ๋์ฝ๋ ์ง์ | ๋ฅ๋ฌ๋/End-to-End ๋ชจ๋ธ์ ์ง์ ๊ตฌ์ถ ํ์ |
์ฐ๊ตฌ ๋ฐ ์ฐ์ ๋ชจ๋ ์ฌ์ฉ ๊ฐ๋ฅ | ์ค์น ๋ฐ ๋น๋ ๋ณต์ก (ํนํ C++ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์์กด) |
๋ค์ํ ์ธ์ด, ๋ฉํฐ ์คํผ์ปค ์ง์ | GUI ๋ถ์กฑ, ๋ช ๋ น์ค ์ค์ฌ |
Kaldi ์ค์น
Kaldi Github์์ ํ๋ก์ ํธ๋ฅผ Cloneํ ํ ํ๊ฒฝ์ ์ค์ ํด ์ค๋ค.
- ์ฌ์ ๊ตฌ์ถ๋ ๋ฐ์ดํฐ์ ์์ (LibriSpeech, TED-LIUM ๋ฑ) ์ ๊ณต
- Python Wrapper (PyKaldi) ์ฌ์ฉ ์ Python์์๋ ํ์ฉ ๊ฐ๋ฅ
GitHub - kaldi-asr/kaldi: kaldi-asr/kaldi is the official location of the Kaldi project.
kaldi-asr/kaldi is the official location of the Kaldi project. - kaldi-asr/kaldi
github.com
git clone https://github.com/kaldi-asr/kaldi.git
cd kaldi/tools
make
cd ../src
./configure
make -j $(nproc)
Kaldi ํ์ฉ ์์
# LibriSpeech ๋ฐ์ดํฐ๋ก ์์ฑ ์ธ์ ๋ชจ๋ธ ํ์ต ์์
cd kaldi/egs/librispeech/s5
./run.sh # ์ ์ฒด ์ํฌํ๋ก์ฐ ์คํ (ํน์ง ์ถ์ถ, ํ์ต, ๋์ฝ๋ฉ, ํ๊ฐ)
- Kaldi ๊ธฐ๋ฐ STT๋ฅผ TCP๋ก ๊ตฌํํ๊ธฐ ์ํด์๋ํด๋ผ์ด์ธํธ๊ฐ TCP๋ก ์์ฑ ์คํธ๋ฆผ ์ ์ก
- ์๋ฒ์์ Kaldi Online2 ๋ฐ์ฝ๋๋ฅผ ํตํด ์ค์๊ฐ ์์ฑ ์ธ์ (STT) ์ํ
- ์ธ์๋ ํ ์คํธ๋ฅผ ํด๋ผ์ด์ธํธ๋ก TCP ์๋ต
'๐ค AI' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
A Survey of Embodied AI: From Simulators to Research Tasks ๋ ผ๋ฌธ ์ ๋ฆฌ - (2) (0) | 2022.07.13 |
---|---|
A Survey of Embodied AI: From Simulators to Research Tasks ๋ ผ๋ฌธ ์ ๋ฆฌ - (1) (0) | 2022.07.12 |