Coder Social home page Coder Social logo

gormonn / microphone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wit-ai/microphone

0.0 0.0 0.0 69 KB

Microphone in the browser using WebRTC and WebSockets

License: Other

JavaScript 29.89% CoffeeScript 40.40% HTML 14.86% CSS 8.11% Shell 6.73%

microphone's Introduction

Microphone

## Quickstart

See quickstart.md

Example

Home automation demo

Demo

(Source code: https://github.com/wit-ai/house)

API

Here are the methods available on the Microphone object

Assumptions

You know how to create the microphone. See quickstart.md for instructions on how to create your microphone.

Available methods

connect(token)

connect the microphone to the Wit instance identified by the token


start()

start streaming audio to the Wit instance (also achieved by clicking on the microphone element on the page)


stop()

stop recording audio (also achieved by clicking on the microphone element on the page). Wit will send a response, received via the onresult handler.


onready(callback)

call the given callback when the microphone is ready to record


onresult(callback)

call the given callback when a response is received from the instance. The callback function takes two arguments: a string corresponding to the detected intent, and a list of entity objects.


onerror(callback)

call the given callback whenever an error occurs. An error string is passed to the callback function.


onaudiostart(callback)

call the given callback when the recording starts.


onaudioend(callback)

call the given callback when the recording stops


onconnecting(callback)

call the given callback when Microphone is waiting for the server to reply or for the user to allow access to her microphone.


ondisconnected(callback)

call the given callback when the connection is closed by the server or the client.

How to build

Dev

grunt serve

### Release

# bump version in microphone.coffee
# bump version in bower.json
./release.sh

License

The license for microphone can be found in LICENSE file in the root directory of this source tree.

microphone's People

Contributors

blandinw avatar jtliao avatar facebook-github-bot avatar stopachka avatar andy1210 avatar oliviervaussy avatar ankitjain28may 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.