translate_wav.sh
Less than 1 minute
translate_wav.sh
Usage:
translate_wav.sh [options] <wav_file>
Options:
--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. must_c.transformer.v1.en-fr)
--cmvn <path> # Location of cmvn.ark
--trans_model <path> # Location of E2E model
--decode_config <path> # Location of configuration file
--api <api_version> # API version (v1 or v2)
Example:
# Record audio from microphone input as example.wav
rec -c 1 -r 16000 example.wav trim 0 5
# Decode using model name
translate_wav.sh --models must_c.transformer.v1.en-fr example.wav
# Decode using model file
translate_wav.sh --cmvn cmvn.ark --trans_model model.acc.best --decode_config conf/decode.yaml example.wav
# Decode with GPU (require batchsize > 0 in configuration file)
translate_wav.sh --ngpu 1 example.wav
Available models:
- must_c.transformer.v1.en-fr
- fisher_callhome_spanish.transformer.v1.es-en