Skip to content
Golang bindings for Mozilla's DeepSpeech speech-to-text library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
deepspeech
.gitignore
LICENSE
README.md
deepspeech.cpp
deepspeech.go
deepspeech_wrap.h

README.md

GoReportCard GoDoc

Golang bindings for Mozilla's DeepSpeech speech-to-text library.

As of now, astideepspeech is only compatible with version v0.4.0 of DeepSpeech.

Installation

Install DeepSpeech

Install astideepspeech

Run the following command:

$ go get -u github.com/asticode/go-astideepspeech/...

Example

Get the pre-trained model

Run the following commands:

$ mkdir /tmp/deepspeech
$ cd /tmp/deepspeech
$ wget https://github.com/mozilla/DeepSpeech/releases/download/v0.4.0/deepspeech-0.4.0-models.tar.gz
$ tar xvfz deepspeech-0.4.0-models.tar.gz

Get the audio files

Run the following commands:

$ cd /tmp/deepspeech
$ wget https://github.com/mozilla/DeepSpeech/releases/download/v0.4.0/audio-0.4.0.tar.gz
$ tar xvfz audio-0.4.0.tar.gz

Use the client

Run the following commands (make sure $GOPATH/bin is in your $PATH):

$ cd /tmp/deepspeech
$ deepspeech -model models/output_graph.pb -audio audio/2830-3980-0043.wav -alphabet models/alphabet.txt -lm models/lm.binary -trie models/trie

    Text: experience proves this

$ deepspeech -model models/output_graph.pb -audio audio/4507-16021-0012.wav -alphabet models/alphabet.txt -lm models/lm.binary -trie models/trie

    Text: why should one halt on the way
    
$ deepspeech -model models/output_graph.pb -audio audio/8455-210777-0068.wav -alphabet models/alphabet.txt -lm models/lm.binary -trie models/trie

    Text: your power is sufficient i said
You can’t perform that action at this time.