Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Apr 17, 2017
1 parent be031ab commit 4d19fe0
Show file tree
Hide file tree
Showing 7 changed files with 1,199 additions and 32 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.2 - 2017-04-17
* Update docs.
* Remove console.log where it wasn't needed.
* Update example slightly.
* Removed all hope of shipping an API key.

## 1.0.1 - 2017-04-17
* Change `.listen()` to `.start()`.

Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ s2t.start()
s2t.stop()
```

To run the example:

```
npm install
npm start
```

You are required to set up your own service account since the speech recognition API requires an account with billing. See:

https://cloud.google.com/speech/docs/common/auth

# API

#### `var s2t = new GetUserMediaToSpeech(options)`
Expand Down
5 changes: 4 additions & 1 deletion example/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ function store (state, bus) {
state.msgs = []
state.listening = false

s2t.on('error', log)
s2t.on('error', logError)
function logError (error) {
state.msgs.push(error.message)
}
s2t.on('status', log)
function log (data) {
state.msgs.push(data)
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ GetUserMediaToText.prototype.start = function () {
this.emit('status', 'Started listening')
this.pipeline = pump(this.audioStream, this.sinkStream, function (err) {
if (err) self.emit('error', err)
console.log('this called')
self.clearPipeline()
})
}
Expand Down
19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{
"name": "getusermedia-to-text",
"version": "1.0.1",
"version": "1.0.2",
"description": "getUserMedia to Text via Google's Speech to Text API",
"main": "index.js",
"scripts": {
"test": "node test.js",
"prepublish": "electron-rebuild",
"start": "electron example/main.js"
"test": "run-s test:*",
"test:deps": "dependency-check ./package.json",
"test:lint": "standard | snazzy",
"test:tape": "tape test.js | tap-format-spec",
"start": "electron-rebuild && electron example/main.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -34,9 +36,16 @@
"pumpify": "^1.3.5"
},
"devDependencies": {
"@tap-format/spec": "^0.2.0",
"choo": "^5.1.5",
"choo-log": "^6.1.1",
"dependency-check": "^2.8.0",
"electron": "~1.6.2",
"electron-rebuild": "^1.5.7"
"electron-rebuild": "^1.5.7",
"global": "^4.3.1",
"npm-run-all": "^4.0.2",
"snazzy": "^7.0.0",
"standard": "^10.0.2",
"tape": "^4.6.3"
}
}
10 changes: 10 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* eslint-disable */
window = require('global/window')
/* eslint-enable */
var test = require('tape')
var GetUserMediaToText = require('./index')

test('module exports a function', function (t) {
t.equal(typeof GetUserMediaToText, 'function')
t.end()
})
Loading

0 comments on commit 4d19fe0

Please sign in to comment.