Coder Social home page Coder Social logo

31434116 / go-astideepspeech Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asticode/go-astideepspeech

0.0 1.0 0.0 29 KB

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

License: MIT License

Go 55.47% C++ 32.70% C 11.83%

go-astideepspeech's Introduction

GoReportCard GoDoc

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

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

Installation

Install DeepSpeech

  • fetch an up-to-date native_client.<your system>.tar.xz matching your system from DeepSpeech's "releases"
  • extract its content to /tmp/deepspeech/lib
  • download deepspeech.h from https://github.com/mozilla/DeepSpeech/raw/v0.6.0/native_client/deepspeech.h
  • copy it to /tmp/deepspeech/include
  • export CGO_LDFLAGS="-L/tmp/deepspeech/lib/"
  • export CGO_CXXFLAGS="-I/tmp/deepspeech/include/"
  • export LD_LIBRARY_PATH=/tmp/deepspeech/lib/:$LD_LIBRARY_PATH

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.6.0/deepspeech-0.6.0-models.tar.gz
$ tar xvfz deepspeech-0.6.0-models.tar.gz

Get the audio files

Run the following commands:

$ cd /tmp/deepspeech
$ wget https://github.com/mozilla/DeepSpeech/releases/download/v0.6.0/audio-0.6.0.tar.gz
$ tar xvfz audio-0.6.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 -lm models/lm.binary -trie models/trie

    Text: experience proves this

$ deepspeech -model models/output_graph.pb -audio audio/4507-16021-0012.wav -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 -lm models/lm.binary -trie models/trie

    Text: your power is sufficient i said

go-astideepspeech's People

Contributors

asticode avatar 31434116 avatar xdjinnx avatar lissyx avatar lu4p avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.