forked from sooftware/kospeech
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
268 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
defaults: | ||
- audio: fbank | ||
- model: joint-ctc-attention-las | ||
- train: las_train | ||
- model: joint-ctc-attention-transformer | ||
- train: transformer_train |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# Soohwan Kim, Seyoung Bae, Cheolhwang Won. | ||
# @ArXiv : KoSpeech: Open-Source Toolkit for End-to-End Korean Speech Recognition | ||
# This source code is licensed under the Apache 2.0 License license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
from .evaluate import EvalConfig | ||
from .audio import ( | ||
MfccConfig, | ||
MelSpectrogramConfig, | ||
SpectrogramConfig, | ||
FilterBankConfig, | ||
) | ||
from .model import ( | ||
DeepSpeech2Config, | ||
ListenAttendSpellConfig, | ||
TransformerConfig, | ||
JointCTCAttentionLASConfig, | ||
JointCTCAttentionTransformerConfig, | ||
) | ||
from .train import ( | ||
DeepSpeech2TrainConfig, | ||
ListenAttendSpellTrainConfig, | ||
TransformerTrainConfig, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# -*- coding: utf-8 -*- | ||
# Soohwan Kim, Seyoung Bae, Cheolhwang Won. | ||
# @ArXiv : KoSpeech: Open-Source Toolkit for End-to-End Korean Speech Recognition | ||
# This source code is licensed under the Apache 2.0 License license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass | ||
class AudioConfig: | ||
audio_extension: str = "pcm" | ||
sample_rate: int = 16000 | ||
frame_length: int = 20 | ||
frame_shift: int = 10 | ||
normalize: bool = True | ||
del_silence: bool = True | ||
feature_extract_by: str = "kaldi" | ||
time_mask_num: int = 4 | ||
freq_mask_num: int = 2 | ||
spec_augment: bool = True | ||
input_reverse: bool = False | ||
|
||
|
||
@dataclass | ||
class FilterBankConfig(AudioConfig): | ||
transform_method: str = "fbank" | ||
n_mels: int = 80 | ||
freq_mask_para: int = 18 | ||
|
||
|
||
@dataclass | ||
class MelSpectrogramConfig(AudioConfig): | ||
transform_method: str = "mel" | ||
n_mels: int = 80 | ||
freq_mask_para: int = 18 | ||
|
||
|
||
@dataclass | ||
class MfccConfig(AudioConfig): | ||
transform_method: str = "mfcc" | ||
n_mels: int = 40 | ||
freq_mask_para: int = 8 | ||
|
||
|
||
@dataclass | ||
class SpectrogramConfig(AudioConfig): | ||
transform_method: str = "spectrogram" | ||
n_mels: int = 161 # Not used | ||
freq_mask_para: int = 24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# Soohwan Kim, Seyoung Bae, Cheolhwang Won. | ||
# @ArXiv : KoSpeech: Open-Source Toolkit for End-to-End Korean Speech Recognition | ||
# This source code is licensed under the Apache 2.0 License license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass | ||
class EvalConfig: | ||
dataset: str = 'kspon' | ||
dataset_path: str = '' | ||
transcript_path: str = '../../../data/eval_transcript.txt' | ||
model_path: str = '' | ||
output_unit: str = 'character' | ||
batch_size: int = 32 | ||
num_workers: int = 4 | ||
print_every: int = 20 | ||
decode: str = 'greedy' | ||
k: int = 3 | ||
use_cuda: bool = True |
Oops, something went wrong.