Golang bindings for Coqui's 🐸STT speech-to-text library.
asticoqui
is compatible with version v1.0.0
, v1.1.0
, and v1.2.0
of 🐸STT.
Run the following command:
$ pip3 install --extra-index-url https://google-coral.github.io/py-repo/ tflite_runtime
If you're interested in running against your CUDA-enabled GPU (optional), then set the environment variable STT_TFLITE_DELEGATE=gpu
.
- fetch an up-to-date
native_client.*.tar.xz
matching your system from 🐸STT releases. For example, on macOS:
$ wget https://github.com/coqui-ai/STT/releases/download/v1.2.0/native_client.tflite.macOS.tar.xz
- extract its content to
$HOME/.coqui/
. For example, on macOS:
$ mkdir $HOME/.coqui/
$ tar -xvzf native_client.tflite.macOS.tar.xz -C $HOME/.coqui/
- set environment variables to point to client
$ export CGO_LDFLAGS="-L$HOME/.coqui/"
$ export CGO_CXXFLAGS="-I$HOME/.coqui/"
$ export LD_LIBRARY_PATH="$HOME/.coqui/:$LD_LIBRARY_PATH"
Run the following command:
$ go get -u github.com/asticode/go-asticoqui/...
Run the following command:
$ go install github.com/asticode/go-asticoqui/cmd
Go to this page and click Enter Email to Download
at the bottom of the page. Download model.tflite
and huge_vocabulary.scorer
.
Run the following commands:
$ cd $HOME/.coqui
$ wget https://github.com/coqui-ai/STT/releases/download/v1.2.0/audio-1.2.0.tar.gz
$ tar -xvfz audio-1.2.0.tar.gz
Run the following commands:
$ go run coqui/main.go -model model.tflite -scorer huge_vocabulary.scorer -audio audio/2830-3980-0043.wav
Text: experience proves this
$ go run coqui/main.go -model model.tflite -scorer huge_vocabulary.scorer -audio audio/4507-16021-0012.wav
Text: why should one hall on the way
$ go run coqui/main.go -model model.tflite -scorer huge_vobaculary.scorer -audio audio/8455-210777-0068.wav
Text: your power is sufficient i said