Bez popisu

Fangjun Kuang b89a6721ce Speech recognition from microphone (#9) před 2 roky
.github c5b9ec6cab Refactor the code (#8) před 2 roky
cmake b89a6721ce Speech recognition from microphone (#9) před 2 roky
scripts 78ce6f6233 Add CI test and refactor the code a bit. (#4) před 2 roky
sherpa-ncnn b89a6721ce Speech recognition from microphone (#9) před 2 roky
toolchains 767e37f6cf Support building for aarch64 (#7) před 2 roky
.clang-format 78ce6f6233 Add CI test and refactor the code a bit. (#4) před 2 roky
.gitignore 0e5a58da20 add arm build support (#3) před 2 roky
CMakeLists.txt b89a6721ce Speech recognition from microphone (#9) před 2 roky
CPPLINT.cfg 78ce6f6233 Add CI test and refactor the code a bit. (#4) před 2 roky
LICENSE 3185205428 First commit před 2 roky
README.md b89a6721ce Speech recognition from microphone (#9) před 2 roky
build-aarch64-linux-gnu.sh 767e37f6cf Support building for aarch64 (#7) před 2 roky
build-arm-linux-gnueabihf.sh 73a681e23c Add CI for arm (#6) před 2 roky

README.md

Introduction

See https://github.com/k2-fsa/sherpa

This repo uses ncnn for running the neural network model and does not depend on libtorch.

Please read https://k2-fsa.github.io/icefall/recipes/librispeech/lstm_pruned_stateless_transducer.html if you are interested in how the model is trained.

We provide exported models in ncnn format and they can be downloaded using the following links:

Usage

git clone https://github.com/k2-fsa/sherpa-ncnn
cd sherpa-ncnn
mkdir build
cd build
cmake ..
make -j6
cd ..

# Now download the pretrained model

git lfs install
git clone https://huggingface.co/csukuangfj/sherpa-ncnn-2022-09-05

./build/bin/sherpa-ncnn \
  ./sherpa-ncnn-2022-09-05/tokens.txt \
  ./sherpa-ncnn-2022-09-05/bar/encoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \
  ./sherpa-ncnn-2022-09-05/bar/encoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \
  ./sherpa-ncnn-2022-09-05/bar/decoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \
  ./sherpa-ncnn-2022-09-05/bar/decoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \
  ./sherpa-ncnn-2022-09-05/bar/joiner_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \
  ./sherpa-ncnn-2022-09-05/bar/joiner_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \
  ./sherpa-ncnn-2022-09-05/test_wavs/1089-134686-0001.wav

To do speech recognition in real-time with a microphone, run:

./build/bin/sherpa-ncnn-microphone \
  ./sherpa-ncnn-2022-09-05/tokens.txt \
  ./sherpa-ncnn-2022-09-05/bar/encoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \
  ./sherpa-ncnn-2022-09-05/bar/encoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \
  ./sherpa-ncnn-2022-09-05/bar/decoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \
  ./sherpa-ncnn-2022-09-05/bar/decoder_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \
  ./sherpa-ncnn-2022-09-05/bar/joiner_jit_trace-iter-468000-avg-16-pnnx.ncnn.param \
  ./sherpa-ncnn-2022-09-05/bar/joiner_jit_trace-iter-468000-avg-16-pnnx.ncnn.bin \