GithubHelp home page GithubHelp logo

Speechmatics

Gem Version Build Status

Speechmatics (https://speechmatics.com) provides an API for speech to text (https://speechmatics.com/api-details).

This gem implements the API making it easier to integrate into Ruby and/or Rails projects.

Installation

Add this line to your application's Gemfile:

gem 'speechmatics'

And then execute:

$ bundle

Or install it yourself as:

$ gem install speechmatics

Usage

See the tests, or here is basic usage:

# configure with api key and user id to use for all requsts
Speechmatics.configure do |sm|
  sm.auth_token = '<your api key here>'
  sm.user_id    = 1234

  # these are defaults
  sm.adapter    = :excon
  sm.endpoint   = 'https://api.speechmatics.com/v1.0/'
  sm.user_agent = "Speechmatics Ruby Gem #{Speechmatics::VERSION}"
end

# create a new client
c = Speechmatics::Client.new

# create a new client, passing in Faraday parameters
# you can also pass in the same options as in `configure`
c = Speechmatics::Client.new(:request => { :timeout => 240 })

# retrieve user
j = c.user.get

# list jobs
jobs = c.user.jobs.list

# create job
info = c.user.jobs.create(data_file: '/Users/nobody/dev/speechmatics/test/zero.wav')

# create job with more options
info = c.user.jobs.create(
  data_file: '/Users/nobody/dev/speechmatics/test/zero.wav',
  content_type: 'audio/x-wav; charset=binary',
  notification: '<email | none | callback>',
  callback: 'http://www.example.com/transcript_callback'
)

# retrieve job
job = c.user.jobs.find(5678)

# retrieve trancript for a job
trans = c.user.jobs(5678).transcript
# alt syntax
trans = c.user.jobs.transcript(5678)

Changes

  • 0.2.0 - 10/12/2016

    • Added alignment support, thanks @rogerz42892
  • 0.1.4 - 8/21/2015

    • Add support for video files.
  • 0.1.3 - 6/10/2015

    • Add default timeout of 120 seconds.
  • 0.1.2 - 6/10/2015

    • Yanked
  • 0.1.1 - 3/26/2015

    • Fix to work with Faraday 0.7.6
  • 0.1.0 - 10/24/2014

    • Remove /user/$userid/jobs/$jobid/audio endpoint, no longer supported by speechmatics
  • 0.0.2 - 8/7/2014

    • Minor bug fix, treat integers/numbers as strings for params
    • Use mimemagic to determine content type (no more libmagic dependency; this works on heroku)
    • Switched the endpoint to use new 'https' requirement

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Speechmatics's Projects

ansible-lvm icon ansible-lvm

Ansible role to manage creation of Logical Volume Groups and Logical Volumes, mount points, filesystems, etc.

ansible-role-hostname icon ansible-role-hostname

This Ansible role will set hostname on any target host. By default hostname is same as inventory_hostname, but can be set as different by using vars. Updates hosts file too.

community icon community

Public area for Speechmatics users to discuss the product and for anyone wanting to learn more

fpm-within-docker icon fpm-within-docker

Leverage fpm inside pre-baked docker images in order to build and test native DEB and RPM packages.

hqa icon hqa

Code to accompany the paper "Hierarchical Quantized Autoencoders"

influxdb icon influxdb

Ansible role for installing, configuring, and maintaining InfluxDB

kaldi icon kaldi

This is now the official location of the Kaldi project.

openfst icon openfst

Port of the OpenFST library to Windows

realtimedemo icon realtimedemo

A demo web application for showcasing our real-time transcription service.

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.