├── .prettierrc ├── .travis.yml ├── static └── images │ └── react-webspeech.png ├── src ├── react-webspeech.ts ├── utils.ts ├── useSpeechSynthesis.ts └── useSpeechRecognition.ts ├── .babelrc ├── examples └── javascript │ ├── src │ ├── index.js │ └── App.js │ ├── public │ ├── manifest.json │ └── index.html │ ├── package.json │ └── README.md ├── .gitignore ├── tsconfig.json ├── LICENSE ├── rollup.config.js ├── .eslintrc.js ├── package.json └── README.md /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "singleQuote": true 4 | } 5 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 12 4 | - 11 5 | - 10 6 | -------------------------------------------------------------------------------- /static/images/react-webspeech.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Bunlong/react-webspeech/HEAD/static/images/react-webspeech.png -------------------------------------------------------------------------------- /src/react-webspeech.ts: -------------------------------------------------------------------------------- 1 | // export { useSpeechRecognition } from './useSpeechRecognition'; 2 | export { useSpeechSynthesis } from './useSpeechSynthesis'; 3 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ]//, 6 | // "plugins": ["@babel/plugin-proposal-class-properties"] 7 | } 8 | -------------------------------------------------------------------------------- /examples/javascript/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import App from "./App"; 4 | 5 | ReactDOM.render( 6 | , 7 | document.getElementById("root") 8 | ); 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | 6 | # builds 7 | build 8 | dist 9 | 10 | package-lock.json 11 | 12 | docs/.next -------------------------------------------------------------------------------- /examples/javascript/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "react-modal-hook", 3 | "name": "react-modal-hook", 4 | "start_url": "./index.html", 5 | "display": "standalone", 6 | "theme_color": "#000000", 7 | "background_color": "#ffffff" 8 | } 9 | -------------------------------------------------------------------------------- /examples/javascript/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { useSpeechSynthesis } from 'react-webspeech'; 3 | 4 | function App() { 5 | const [text, setText] = useState('I love React'); 6 | const { speak } = useSpeechSynthesis(); 7 | 8 | return ( 9 |
10 |