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

Commit 4d19fe0

Browse files
committed
v1.0.2
1 parent be031ab commit 4d19fe0

File tree

7 files changed

+1199
-32
lines changed

7 files changed

+1199
-32
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## 1.0.2 - 2017-04-17
6+
* Update docs.
7+
* Remove console.log where it wasn't needed.
8+
* Update example slightly.
9+
* Removed all hope of shipping an API key.
10+
511
## 1.0.1 - 2017-04-17
612
* Change `.listen()` to `.start()`.
713

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ s2t.start()
2828
s2t.stop()
2929
```
3030

31+
To run the example:
32+
33+
```
34+
npm install
35+
npm start
36+
```
37+
38+
You are required to set up your own service account since the speech recognition API requires an account with billing. See:
39+
40+
https://cloud.google.com/speech/docs/common/auth
41+
3142
# API
3243

3344
#### `var s2t = new GetUserMediaToSpeech(options)`

example/renderer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ function store (state, bus) {
2121
state.msgs = []
2222
state.listening = false
2323

24-
s2t.on('error', log)
24+
s2t.on('error', logError)
25+
function logError (error) {
26+
state.msgs.push(error.message)
27+
}
2528
s2t.on('status', log)
2629
function log (data) {
2730
state.msgs.push(data)

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ GetUserMediaToText.prototype.start = function () {
8686
this.emit('status', 'Started listening')
8787
this.pipeline = pump(this.audioStream, this.sinkStream, function (err) {
8888
if (err) self.emit('error', err)
89-
console.log('this called')
9089
self.clearPipeline()
9190
})
9291
}

package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
22
"name": "getusermedia-to-text",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "getUserMedia to Text via Google's Speech to Text API",
55
"main": "index.js",
66
"scripts": {
7-
"test": "node test.js",
8-
"prepublish": "electron-rebuild",
9-
"start": "electron example/main.js"
7+
"test": "run-s test:*",
8+
"test:deps": "dependency-check ./package.json",
9+
"test:lint": "standard | snazzy",
10+
"test:tape": "tape test.js | tap-format-spec",
11+
"start": "electron-rebuild && electron example/main.js"
1012
},
1113
"repository": {
1214
"type": "git",
@@ -34,9 +36,16 @@
3436
"pumpify": "^1.3.5"
3537
},
3638
"devDependencies": {
39+
"@tap-format/spec": "^0.2.0",
3740
"choo": "^5.1.5",
3841
"choo-log": "^6.1.1",
42+
"dependency-check": "^2.8.0",
3943
"electron": "~1.6.2",
40-
"electron-rebuild": "^1.5.7"
44+
"electron-rebuild": "^1.5.7",
45+
"global": "^4.3.1",
46+
"npm-run-all": "^4.0.2",
47+
"snazzy": "^7.0.0",
48+
"standard": "^10.0.2",
49+
"tape": "^4.6.3"
4150
}
4251
}

test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* eslint-disable */
2+
window = require('global/window')
3+
/* eslint-enable */
4+
var test = require('tape')
5+
var GetUserMediaToText = require('./index')
6+
7+
test('module exports a function', function (t) {
8+
t.equal(typeof GetUserMediaToText, 'function')
9+
t.end()
10+
})

0 commit comments

Comments
 (0)