Giter Site home page Giter Site logo

speech2text's Introduction

Speech2Text

Using the power of ffmpeg/flac/Google and ruby here is a simple interface to play with to convert speech to text.

Using a new undocumentd speech API from Google with the help of this article: mikepultz.com/2011/03/accessing-google-speech-api-chrome-11/

We’re able to provide a very simple API in Ruby to decode simple audio to text.

The API from Google is not yet public and so may change. It also seems to be very fragile as more times than not it will return a 500, so the library has retry code built in - for larger audio files 10+ failures may return before a successful result is retrieved…

It also appears that the API only likes smaller audio files so there is a built in chunker that allows us to split the audio up into smaller chunks.

Example

audio = Speech::AudioToText.new("i-like-pickles.wav")
puts audio.to_text.inspect
=> {"captured_json"=>[["I like pickles", 0.92731786]], "confidence"=>0.92731786}

Command Line

speech2text i-like-pickles.wav
cat i-like-pickles.json
{"captured_json"=>[["I like pickles", 0.92731786]], "confidence"=>0.92731786}

speech2text's People

Contributors

taf2 avatar jcla1 avatar

Watchers

 avatar James Cloos avatar  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.