一组使用 Web Speech API 为 React 应用程序带来语音体验的 React 组件
Set of React components that use the Web Speech API to bring voice experience to React applications. Check out the :sparkles: :gem: LIVE DEMO :gem: :sparkles:
Install the components using npm:
$ npm install --save react-voice-componentsimport { VoicePlayer, VoiceRecognition } from 'react-voice-components'ReactDOM.render(
,
document.getElementById('root')
)Provides you a simple React component to do speech synthesis (text to speech).
| Property | Options | Description |
|---|---|---|
| play | boolean | Specifies if the speech should be played when mounted. |
| pause | boolean | Specifies if the speech should pause |
| text | string | Specifies the text that shall be spoken. |
| lang | en-US, en-GB, es-ES, fr-FR, it-IT, de-DE, ja-JP, pt-BR, zh-CN |
Specifies the accent and language the speech will be spoken. |
| Property | Description |
|---|---|
| onStart | Runs when the speech starts to be spoken. |
| onEnd | Runs when the speech completes to be spoken. |
| onPause | Runs when te speech is paused. |
| onResume | Runs when the speech is resumed. |
Provides you a simple React component to do voice recognition (speech to text).
| Property | Options | Description |
|---|---|---|
| continuous | boolean | Specifies if the recognition should continue when the user pauses while speaking. |
| stop | boolean | Specifies if the recognition should be stoped (when used with continuous=true) |
| Property | Description |
|---|---|
| onStart | Runs when the recognition starts. |
| onEnd | Runs when the recognition ends. |
| onError | Runs when there is a recognition error. |
| onResult | Runs when there is a recognition result. |
git checkout -b my-new-featuregit commit -m 'Add some feature'git push origin my-new-featureMIT (c) 2017 Guilherme Rv Coelho
暂无开放 Issues,或尚未同步最近议题。