Giter Site home page Giter Site logo

goodatlas / zeroth Goto Github PK

View Code? Open in Web Editor NEW
346.0 35.0 122.0 1.44 MB

Kaldi-based Korean ASR (한국어 음성인식) open-source project

License: Apache License 2.0

Shell 56.09% Python 43.91%
kaldi zeroth korean asr language-model speech-recognition audio-data lexicon open-source fastcampus data-augmentation tdnn

zeroth's Introduction

Project: Zeroth

Zeroth is an open source project for Korean speech recognition implemented using the Kaldi toolkit.

This project was developed as part of Atlas Labs’s (https://www.atlaslabs.ai) Language AI platform, which enables enterprises to add intelligence to their B2C communications.

By introducing an official Korean Kaldi recipe, the Zeroth project aims to make Korean speech recognition more broadly accessible to everyone.

As the name Zeroth, or the 0th, suggests, this project’s aim to be the starting point and a foundational piece upon which anyone can build new products and services using speech recognition.

We hope you find this project useful and welcome any opportunities to discuss or work together.

Contact: Lucas Jo ([email protected])

Special thanks

Mentioned links

0. Overview

1. Audio Data

We offer a voice recording app [MoreCoin (Android)] (https://play.google.com/store/apps/details?id=com.goodatlas.morecoin) that you can use to participate in building our open source database of Korean training data.

2. Requirements

Acoustic Model

The latest Kaldi recipe is applied to the Zeroth's acoustic model:

  • TDNN (with Factorization) / TDNN + LSTM / TDNN + OPGRU
  • Chain model
  • Data augmentation of reverberant speech

Language Model & Lexicon

Zeroth's language model and phonetic dictionary use an end-to-end data driven approach. Any contributions to our open source audio database will automatically be incorporated into the latest language model and phonetic dictionary.

To create a custom language model and phonetic dictionary: [s5 / data / local / lm / README.md] (https://github.com/goodatlas/zeroth/blob/master/s5/data/local/lm/README.md).

  • Corpus (Corpus)

    • Training sentences: 109,037,699
    • Test sentences: 12,115,208
    • Total: 121,152,907
  • Phonetic Dictionary

    • Unique words: 30,064,143
    • Unique words with the highest 98% frequency: 8,069,252
    • Unique morphemes: 465,253
    • Size of phonetic dictionary considering pronunciation diversity: 686,839
  • Language Model

    • Perplexity test 3-gram: ppl= 221.2969 (12,115,208 sentences, 194,940,635 words, 0 OOVs)
    • Perplexity test 4-gram: ppl= 187.2058 (12,115,208 sentences, 194,940,635 words, 0 OOVs)

Project: Zeroth

Zeroth 프로젝트는 Kaldi open source tool-kit 을 사용해서 한국어 음성인식기를 구현하는 프로젝트 입니다. 이 프로젝트는 기업이 AI를 고객 서비스에 추가하는 데 도움이되는 (주)아틀라스가이드의 Language AI 플랫폼 개발의 일부로서 개발되었습니다. Kaldi official recipe 에 한국어 버전을 소개하는 것을 시작으로, 많은 사람들의 참여를 통해 누구나 사용할 수 있는 음성인식기를 만들어 나갈 수 있도록 하는 것을 목표로하는 프로젝트입니다. 제로스라는 이름은 0-th, 즉 0 번째를 의미합니다. 이름이 의미하는 것처럼 이 프로젝트를 통해 음성인식기를 만들기 위해 필요한 모든 과정을 처음부터 끝까지 함께 해보고 토론할 수 있기를 바랍니다.

Contact: Lucas Jo ([email protected])

Special thanks

  • Gridspace Inc. 사에서 일하고 계신 Wonkyum Lee 님과의 co-work 를 통해 이 프로젝트를 진행하고 있음을 밝힙니다.

Mentioned links

0. Overview

1. Audio Data

  • 2018.07.16: 95.7 시간 (46,347발화, 181명, 27,330문장)
  • 2018.04.09: 76.6 시간 (35,139발화, 137명, 16,472문장)
  • 2018.02.03: 51.6 시간 한국어 학습데이터 (22,263 발화, 105명, 3000 문장)
  • License: CC BY 4.0
  • 현재 OpenSLR에서 51.6 시간 오디와 LM 데이터를 받아보실 수 있습니다.
  • 모어코인을 통한 기부로 오픈소스 오디오가 커지고 있습니다. 4월에는 1시간 기부시 70시간 데이터를 받아보실 수 있습니다. 모어코인앱을 통해 음성을 기부해 주세요.

현재 제로스 프로젝트에는 상기와 같은 음성데이터가 포함되어 있습니다. 공개 음성 DB 구축에 참여할 수 있는 음성 녹음 앱 모아코인(Android)을 과 모아코인(iOS)제공하고 있으며, 해당 앱을 통해 음성 데이터를 1시간 기부해주시면 해당 시점까지 구축된 공개 음성 DB에 접근하여 다운로드할 수 있는 권한을 AWS temporary credential 형태로 발급해 드립니다. 한번 발급된 credential은 12 시간 동안 유효합니다. 더 자세한 내용은 AWS-temporary-credential 페이지를 확인하시기 바랍니다

2. Requirements

  • 제로스 프로젝트를 실행하는데 필요한 패키지들에 대한 설명은 Requirements 위키 페이지를 참조하시기 바랍니다.
  • 언어모델과 발음사전을 구현하는 코드를 직접 실행하기 위해서는 Requirements-2 위키 페이지를 참조하여 추가적인 패키지를 설치하시기 바랍니다.

3. Acoustic Model

현재 제로스 프로젝트 음향모델에는 아래와 같은 최신 kaldi recipe 가 적용되어 있습니다.

  • TDNN (with Factorization) / TDNN + LSTM / TDNN + OPGRU
  • Chain model
  • Data augmentation of reverberant speech

4. Language Model & Lexicon

제로스 프로젝트에 사용되는 언어모델과 발음사전은 처음부터 끝까지 data-driven 방식으로 만들어집니다. 아래는 AWS-temporary-credential 을 발급받은 경우 오디오 데이터와 함께 자동으로 받아지는 언어모델과 발음사전의 세부사항입니다. 개인적으로 직접 특화된 언어모델과 발음사전을 만들고자 하는 경우에는 세부적인 방법이
s5/data/local/lm/README.md 에 기술되어 있으니 참조하시기 바랍니다.

  • 말뭉치(Corpus)

    • 훈련된 문장의 수: 109,037,699
    • 테스트 문장의 수:  12,115,208
    • 전 체: 121,152,907
  • 발음사전(Lexicon)

    • 고유한 단어의 수: 30,064,143
    • 상위 98% 빈도 수를 보이는 고유한 단어의 수: 8,069,252
    • Data-drive 방식으로 찾은 고유한 형태소의 수: 465,253
    • 발음 다양성을 고려한 발음사전의 크기: 686,839
  • 언어모델(Language Model)

    • Perplexity test 3-gram: ppl= 221.2969 (12,115,208 sentences, 194,940,635 words, 0 OOVs)
    • Perplexity test 4-gram: ppl= 187.2058 (12,115,208 sentences, 194,940,635 words, 0 OOVs)

zeroth's People

Contributors

ikdk5596 avatar jty016 avatar robinlyu avatar wonkyuml avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zeroth's Issues

Downloaded sets different than on published RESULTS

NOTE: I'm referring to the RESULTS file on the current Kaldi commit, not goodatleas/zeroth

Hi, I tried running the provided recipes for zeroth_korean on kaldi. I didn't change anything on the scripts but when I looked at the evaluations, I found that the test set is only giving me 6641 "words" (individual tokens separated by space). The RESULTS text file however, shows that there are 9253 words. What do you think is the issue why there is a discrepancy with the data I'm processing?

Another insight on my current setup, when I reached nnet3's common procedures for ivector extraction, I first tried turning off speed perturbation. Once it reaches the point where the training data is being subset to 30,000 utterances, it gave an error because the training set (train_clean) is only 22263 files. Maybe there's something I'm missing?

음성 데이터 문의

안녕하세요. 고려대 금민석입니다.
한국어 음성인식에 큰 기여를 해주시는 점 다시 한번 감사드립니다.
github 은 clone 만 해보았는데 issue 에 글을 올려보는 것은 처음이네요. ^^

아직 음향모델 훈련을 돌려보지는 않았는데요. 일단은 https://github.com/goodatlas/zeroth/blob/master/s5/RESULTS 에 나와있는 성능을 참고하여, 제가 연구에 사용하던 음성인식기로 AWS 에서 받은 test_data_01 데이터의 성능 확인을 해보고 비교해보려고 했는데요.

성능이 매우 저조하게 나와서 음성데이터를 확인해보니 제가 훈련에 사용한 ETRI 음성데이터와 음향특성에 차이가 큰 것 때문이 아닌가 생각이 됩니다. 혹시 별도의 speech enhancement 가 적용되었는지 문의드립니다. 제가 훈련한 데이터가 별도의 RIR 처리를 안해서 그런 것 같기도 하네요.

G2P 문의

안녕하세요

좋은 자료에 감사드립니다.
페북 포스팅을 보고 G2P 및 LM을 어떻게 구성하셨는지 보다가
Morfessor에 대해 궁금한 점이 있어 문의를 드립니다.

우연히 형태소 인식단위 G2P와 단어 단위의 G2P 비교를 독일어에 대해 연구한 자료를 알게 되었습니다.
https://nats-www.informatik.uni-hamburg.de/pub/SLP16/WebHome/POSTER-g2p.pdf

여기서는 단어 단위의 G2P가 더 좋은 성능으로 나오는 것으로 소개가 되어 있어
한국어는 어떻게 비교가 될지 무척 궁금해졌습니다.

관련 해서 혹시 비교해보신 경험이나 연구 내용이 있으신지요..

권호민 드림

A suggestion to modify the updateSegmentation.sh

If we make the assumption that the input text is going to be UTF-8 file format, I think that The following needs to be modified from

morfessor -l $lmDir/zeroth_morfessor.seg -T - -o - \

morfessor -l $lmDir/zeroth_morfessor.seg -T - -o - \
to
morfessor -e 'utf-8' -l $lmDir/zeroth_morfessor.seg -T - -o - \

This is because morfessor defaults to the assumption that the text is ASCII.

[문의] 모아코인 음성 녹음

안녕하세요.
모아코인 앱을 이용해서 음성 녹음을 하려고 했는데,
No open campaign found 라고 뜨며 더 이상 진행이 되지 않고 있습니다.
관련해서 확인 부탁 드릴께요.

@최신 음성 데이터를 얻을 수 있는 다른 방법이 있다면 공유해 주시면 감사하겠습니다 (__)

95.7 hours zeroth use aws s3 to download, but An error occurred (403) when calling the HeadObject operation: Forbidden

  • 16 July 2018: 95.7 hours (46,347 utterances, 181 speakers, 27,330 uniq. sentences)

I use my account to aws s3 cp s3://zeroth-opensource/AUDIO_INFO AUDIO_INFO. But have as follow error:

Traceback (most recent call last):
  File "/home/kaldi/python3/lib/python3.7/site-packages/awscli/customizations/s3/s3handler.py", line 173, in call
    for fileinfo in fileinfos:
  File "/home/kaldi/python3/lib/python3.7/site-packages/awscli/customizations/s3/fileinfobuilder.py", line 31, in call
    for file_base in files:
  File "/home/kaldi/python3/lib/python3.7/site-packages/awscli/customizations/s3/filegenerator.py", line 142, in call
    for src_path, extra_information in file_iterator:
  File "/home/kaldi/python3/lib/python3.7/site-packages/awscli/customizations/s3/filegenerator.py", line 318, in list_objects
    yield self._list_single_object(s3_path)
  File "/home/kaldi/python3/lib/python3.7/site-packages/awscli/customizations/s3/filegenerator.py", line 355, in _list_single_object
    response = self._client.head_object(**params)
  File "/home/kaldi/python3/lib/python3.7/site-packages/botocore/client.py", line 386, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/kaldi/python3/lib/python3.7/site-packages/botocore/client.py", line 705, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
2021-07-22 16:40:56,020 - Thread-1 - awscli.customizations.s3.results - DEBUG - Shutdown request received in result processing thread, shutting down result thread.
Download from AWS is failed, check your credential and configure your aws CLI

Can you help me?

AUDIOINFO='AUDIO_INFO'
AUDIOLIST=$2
bucketname="zeroth-opensource"
# download audio info file
if [ ! -f $data/$AUDIOINFO ]; then
    aws s3 cp s3://$bucketname/$AUDIOINFO $data/$AUDIOINFO
    success=$(echo $?)
    if [ $success -ne 0 ]; then
        echo "Download from AWS is failed, check your credential and configure your aws CLI"
        exit 1
    fi
fi

# download Audio
echo "Now download Audio ----------------------------------------------------"
for file in $AUDIOLIST
do
	echo "check if $file.tar.gz exist or not"
	if [ ! -f $data/$file.tar.gz ]; then
		aws s3 cp s3://$bucketname/$file.tar.gz $data/$file.tar.gz
	else
		echo "  $data/$file.tar.gz already exist"
	fi
done

gzip: data/local/lm/zeroth.lm.tgsmall.arpa.gz: unexpected end of file 문제

안녕하세요. 한국어 음성인식기를 찾는 도중 이런 좋은 repo를 발견할 수 있어서 영광입니다.

지금 클론해서 세팅 끝내고 테스트를 해보려고 하는데요. 테스트 도중 에러가 나더라구요.

아마 파일에 에러가 있는 것 같은데 혹시 확인 가능하신가요?

./run_openslr.sh 실행 결과입니다.

Checking data/lang_nosp/oov.{txt, int} ...
--> text seems to be UTF-8 or ASCII, checking whitespaces
--> text contains only allowed whitespaces
--> 1 entry/entries in data/lang_nosp/oov.txt
--> data/lang_nosp/oov.int corresponds to data/lang_nosp/oov.txt
--> data/lang_nosp/oov.{txt, int} are OK

--> data/lang_nosp/L.fst is olabel sorted
--> data/lang_nosp/L_disambig.fst is olabel sorted
--> SUCCESS [validating lang directory data/lang_nosp]

gzip: data/local/lm/zeroth.lm.tgsmall.arpa.gz: unexpected end of file
arpa2fst --disambig-symbol=#0 --read-symbol-table=data/lang_nosp_test_tgsmall/words.txt - data/lang_nosp_test_tgsmall/G.fst
ERROR (arpa2fst[5.5.433-7637d]:Read():arpa-file-parser.cc:127) line 1 []: \data\ section missing or empty.

[ Stack-Trace: ]
/home/slothjuns/kaldi/src/lib/libkaldi-base.so(kaldi::MessageLogger::LogMessage() const+0xb42) [0x7f70e145b692]
arpa2fst(kaldi::MessageLogger::LogAndThrow::operator=(kaldi::MessageLogger const&)+0x21) [0x55d613cc54cf]
/home/slothjuns/kaldi/src/lib/libkaldi-lm.so(kaldi::ArpaFileParser::Read(std::istream&)+0xa8f) [0x7f70e18b310f]
arpa2fst(main+0xd24) [0x55d613cc414e]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f70e037ab97]
arpa2fst(_start+0x2a) [0x55d613cc334a]

kaldi::KaldiFatalError%


OpenSLR 의 text data의 Transliterate/Normalize되지 않은 text 문의

안녕하세요? OpenSLR 를 다운로드하여 압축을 풀고 텍스트 파일을 열어보니, 숫자나 영어단어, 구둣점 등이 전부 README에 설명된 방식으로 Transliterate/Normalize 되어 있는 것으로 보입니다.

혹시 위 OpenSLR 에 공개된 텍스트 데이터에 한하여, 각 문장들이 Normalize 되기 전 단계의 텍스트 데이터 또한 정리되어 있을지요? 혹시 공개가 가능하다면 어떻게 받을 수 있을지 문의드립니다.

모아코인 관련 질문

안녕하세요. ios에 모아코인이 안보입니다.
혹시 제가 data를 받아고싶은데 어떻게 받을수있는 방법이 없을까요?

감사합니다.

question about gathering raw dataset

I want to download the raw dataset by Morecoin.
But due to some technical reason, I cannot sign-up the Morecoin.
Does anything I can do about this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.