recog_wav.sh
Less than 1 minute
recog_wav.sh
Usage:
recog_wav.sh [options] <wav_file>
Options:
--backend <chainer|pytorch> # chainer or pytorch (Default: pytorch)
--ngpu <ngpu> # Number of GPUs (Default: 0)
--decode_dir <directory_name> # Name of directory to store decoding temporary data
--models <model_name> # Model name (e.g. tedlium2.transformer.v1)
--cmvn <path> # Location of cmvn.ark
--lang_model <path> # Location of language model
--recog_model <path> # Location of E2E model
--decode_config <path> # Location of configuration file
--api <api_version> # API version (v1 or v2, available in only pytorch backend)
Example:
# Record audio from microphone input as example.wav
rec -c 1 -r 16000 example.wav trim 0 5
# Decode using model name
recog_wav.sh --models tedlium2.transformer.v1 example.wav
# Decode with streaming mode (only RNN with API v1 is supported)
recog_wav.sh --models tedlium2.rnn.v2 --api v1 example.wav
# Decode using model file
recog_wav.sh --cmvn cmvn.ark --lang_model rnnlm.model.best --recog_model model.acc.best --decode_config conf/decode.yaml example.wav
# Decode with GPU (require batchsize > 0 in configuration file)
recog_wav.sh --ngpu 1 example.wav
Available models:
- tedlium2.rnn.v1
- tedlium2.rnn.v2
- tedlium2.transformer.v1
- tedlium3.transformer.v1
- librispeech.transformer.v1
- librispeech.transformer.v1.transformerlm.v1
- commonvoice.transformer.v1
- csj.transformer.v1