Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-web-voice

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-web-voice - npm Package Compare versions

Comparing version 0.2.0 to 1.0.0

.prettierrc

13

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc