
# Quick Guide

## About how to automatically generate a speech recognition set

The speech recognition set created using this procedure is equivalent to the OSS version HARK's speech recognition set [HARK_recog_3.0.0_practice2.zip](https://hark.jp/networks/HARK_recog_3.0.0_practice2.zip) , which can be downloaded from [HARK Samples page](https://hark.jp/download/samples/) .
Note: To build a speech recognition set, you will need an Internet connection.

1. Install PyHARK following [the PyHARK install instruction page](https://hark.jp/packages/hark-acoustic-library-hark-lib/hark-lib-package-installation/) instructions.

2. If you need C++ samples, you will need a compilation environment, so you will need to install the following packages.

```
sudo apt update
sudo apt install libtool cmake cmake-extras build-essential libopenblas-base libopenblas-dev gfortran liblapack-dev liblapacke-dev libeigen3-dev pybind11-dev python3-dev python3-pybind11 python3-setuptools python3-pkgconfig python3-pip python3-numpy python3-scipy python3-matplotlib python3-kivy libfmt-dev zlib1g-dev libharkio3 wget kaldidecoder-hark
```

3. The steps to build a speech recognition set are as follows.

```
cd hark-lib-sample/scripts
./prepare.sh
```

4. The speech recognition set is generated in a directory called "build".

## How to use the speech recognition set

Start two terminals on the same machine.

* Terminal-1 : The speech recognition engine must be started in advance.

```
cd build
./1_run_ASR.sh
```

* Terminal-2 : Any commands you run in this terminal must be done after the speech recognition engine has started. Execute processing with HARK library.

```
cd build

# When calling the HARK library from a Python script
./2A_run_PyHARK.sh

# When calling the HARK library from a pre-built binary (a program compiled from C++ source code)
./2B_run_libhark.sh
```

# for programmers

## for Python language users

The sample network used in the speech recognition set is "tutorial.py". Other samples can be found in "hark-lib-sample/python".

## for C++ language users

The sample network used in the speech recognition set is "hark-lib-sample-tutorial". This binary was built by running "cmake .. && make" under the "hark-lib-sample/build" directory, and the source code is located in "hark-lib-sample/src". Several samples are prepared in "hark-lib-sample/src".

