Recently I spent quite a lot of time learning how to run kaldi on Android with absolutely no idea about Android development or Java. After reading a few blog posts, github repos and running into a lot of problems, here is some notes on how I got it working at last. I hope this post will be helpful for anyone who is facing the same challenge as I did.

Setup Android NDK r17 arm64 toolchain

A list of Android NDK packages can be found…


Statistical tests are important tools for understanding the dataset, performing feature engineering and feature selection. This blog will give a brief introduction of some common statistical tests, what do they do and when to use them.

Types of tests:

  • Correlation: check the association between variables.
  • Comparison of means: check the differences between means of variables.
  • Regression: check if one variable predicts changes in another variable.
  • Non-Parametric: tests that are used when data does not meet the assumptions of parametric tests.

A few concepts before we start:

  • H₀: null hypothesis, there is no variation between the two populations (variables), e.g. …


This note is the second part of Understanding kaldi recipes with mini-librispeech example. In the previous note, we walked through data preparation, LM training, monophone and triphone training as well as decoding. And in this note we will focus on training a DNN/HMM ASR model by going through local/chain/run_tdnn.sh in mini_librispeech folder.

Parameters setup

# First the options that are passed through to run_ivector_common.sh
# (some of which are also used in this script directly).
stage=0 # set stage for i-vector extraction
decode_nj=10 # number of decoding parallel jobs
train_set=train_clean_5 # train set
test_sets=dev_clean_2 # test set
gmm=tri3b # folder to find the…


This note provides a high-level understanding of how kaldi recipe scripts work, with the hope that people with little experience in shell scripts (like me) can save some time learning kaldi.

Mini-librispeech is a small subset of LibriSpeech corpus which consists of audio book reading speech. We will go through each step in kaldi/egs/mini_librispeech/s5/run.sh.

Parameters and environment setup

# Change this location to somewhere where you want to put the data.
# Specifiy where you want to store audio and language model data.
data=./corpus/
# Specify the url for downloading audio data.
data_url=www.openslr.org/resources/31
# Specify the url for downloading vocabulary, lexicon and pre-trained language…

Qianhui Wan

Machine Learning | Speech Recognition | Data Science

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store