Golang bindings for Mozilla's DeepSpeech speech-to-text library.
As of now, astideepspeech
is only compatible with version v0.1.1
of DeepSpeech
.
-
get the code by following instructions in DeepSpeech's "Getting the code" chapter
-
cd
into the directory you've just cloned the project into -
run the following commands:
$ git checkout v0.1.1 $ sudo mkdir /usr/local/include/DeepSpeech $ sudo cp native_client/*.h /usr/local/include/DeepSpeech $ sudo cp native_client/build/*.so /usr/local/lib
-
make sure
/usr/local/lib
is in yourLD_LIBRARY_PATH
environment variable
Run the following command:
$ go get -u github.com/asticode/go-astideepspeech/...
Run the following commands:
$ mkdir /tmp/deepspeech
$ cd /tmp/deepspeech
$ wget https://github.com/mozilla/DeepSpeech/releases/download/v0.1.1/deepspeech-0.1.1-models.tar.gz
$ tar xvfz deepspeech-0.1.1-models.tar.gz
Run the following commands:
$ cd /tmp/deepspeech
$ wget https://github.com/mozilla/DeepSpeech/releases/download/v0.1.1/audio-0.1.1.tar.gz
$ tar xvfz audio-0.1.1.tar.gz
Run the following commands (make sure $GOPATH/bin
is in your $PATH
):
$ cd /tmp/deepspeech
$ deepspeech models/output_graph.pb audio/2830-3980-0043.wav models/alphabet.txt models/lm.binary models/trie
Text: experience proves this
$ deepspeech models/output_graph.pb audio/4507-16021-0012.wav models/alphabet.txt models/lm.binary models/trie
Text: why should one halt on the way
$ deepspeech models/output_graph.pb audio/8455-210777-0068.wav models/alphabet.txt models/lm.binary models/trie
Text: your power is sufficient i said