Skip to content

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

License

Notifications You must be signed in to change notification settings

go-dockly/go-astideepspeech

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoReportCard GoDoc

Golang bindings for Mozilla's/Coqui's STT speech-to-text library.

astideepspeech is compatible with version v1.0.0 of STT.

Installation

Install tflite

Run the following command:

$ pip3 install --extra-index-url https://google-coral.github.io/py-repo/ tflite_runtime

Install Coqui STT

  • fetch an up-to-date native_client.<your system>.tar.xz matching your system from "releases"
  • extract its content to /tmp/stt/lib
  • set environment variables to point to client export CGO_LDFLAGS="-L/tmp/native_client.tflite.Linux/" export CGO_CXXFLAGS="-I/tmp/native_client.tflite.Linux/" export LD_LIBRARY_PATH=/tmp/native_client.tflite.Linux//:$LD_LIBRARY_PATH

Install astideepspeech

Run the following command:

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

Example

Get the pre-trained model and scorer

Sign up with your email and download the scorer and tflite files from eg https://coqui.ai/english/coqui/v1.0.0-large-vocab

Get the audio files

Run the following commands:

$ cd /tmp/deepspeech
$ wget https://github.com/coqui-ai/STT/releases/download/v1.0.0/audio-1.0.0.tar.gz
$ tar xvfz audio-1.0.0.tar.gz

Use this client

Run the following commands:

$ go run deepspeech/main.go -model stt-1.0.0-model.tflite -scorer stt-1.0.0-model.scorer -audio audio/2830-3980-0043.wav

    Text: experience proves this

$ go run deepspeech/main.go -model stt-1.0.0-model.tflite -scorer stt-1.0.0-model.scorer -audio audio/4507-16021-0012.wav

    Text: why should one hall on the way
    
$ go run deepspeech/main.go -model stt-1.0.0-model.tflite -scorer stt-1.0.0-model.scorer -audio audio/8455-210777-0068.wav

    Text: your power is sufficient i said

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 57.6%
  • C++ 31.5%
  • C 10.9%