funcwj / android-kws

Source code for implementing KWS demo on android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple KWS Demo on Android

Component

  • log-filterbank feature extractor in C(according to HTK, seems out of time)
  • simple forword network in C(ReLU and Softmax, only fits for the trainning model)
  • data visualization by MPAndroidChart
  • train the simple model by keras

Notes

  • nnet and fbank-extractor interface are called through JNI
  • training scripts are in folder scripts, and hdf5tobin.py aims to transfer the model into binary which could be read by the JNI.
  • use OpenBlas to optimize forword process like(need to modify the gradle file and add Android.mk and Application.mk):
void forword(vector x, matrix w, vector y, vector b) {
    cblas_scopy(b->size, b->data, 1, y->data, 1);
    cblas_sgemv(CblasRowMajor, CblasNoTrans, y->size, x->size, 1, w->data, x->size, x->data, 1, 1, y->data, 1);
}

Snapshots

About

Source code for implementing KWS demo on android


Languages

Language:Java 49.8%Language:C++ 29.0%Language:Python 15.1%Language:C 6.1%