react-web-voice
Advanced tools
Comparing version 0.2.0 to 1.0.0
{ | ||
"name": "react-web-voice", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "web speech and recognition as react hook", | ||
@@ -11,3 +11,4 @@ "module": "dist/react-web-voice.esm.js", | ||
"prebuild": "rm -rf dist", | ||
"build": "rollup -c rollup.config.js" | ||
"build": "rollup -c rollup.config.js", | ||
"build-demo": "webpack" | ||
}, | ||
@@ -18,4 +19,4 @@ "author": "Duong Tran", | ||
"peerDependencies": { | ||
"react": "16.8.0-alpha.1", | ||
"react-dom": "16.8.0-alpha.1" | ||
"react": "16.11.0", | ||
"react-dom": "16.11.0" | ||
}, | ||
@@ -34,4 +35,4 @@ "devDependencies": { | ||
"jest": "^24.8.0", | ||
"react": "16.8.0-alpha.1", | ||
"react-dom": "16.8.0-alpha.1", | ||
"react": "16.11.0", | ||
"react-dom": "16.11.0", | ||
"rollup": "1.1.0", | ||
@@ -38,0 +39,0 @@ "rollup-plugin-commonjs": "9.2.0", |
@@ -39,11 +39,8 @@ # React Web Voice | ||
const speakButtonHandler = () => { | ||
speak({ | ||
const speakButtonHandler = async () => { | ||
const utterance = await speak({ | ||
text: 'Hello', | ||
volume: 0.5, | ||
rate: 1, | ||
pitch: 1, | ||
onSpeakEnd: () => { | ||
// Do something cool after finish speaking | ||
} | ||
pitch: 1 | ||
}); | ||
@@ -79,8 +76,4 @@ }; | ||
const listenButtonHandler = () => { | ||
listen(transcript => { | ||
console.log( | ||
`Here is what you say, not really, it's what the browser think you say ${transcript}` | ||
); | ||
}); | ||
const listenButtonHandler = async () => { | ||
const transcript = await listen(); | ||
}; | ||
@@ -103,1 +96,5 @@ | ||
An example of how to use these two hooks can found inside the demo folder. | ||
## Version 1.0 Breaking Changes | ||
With version 1.0, we decided to get rid of the callback function on both `speak` and `listen` function but replacing them with a promise. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
41096
28
567
0
1
98