react-voice-components

WebJar for react-voice-components

License

License

MIT
Categories

Categories

React User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

react-voice-components
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

react-voice-components
WebJar for react-voice-components
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/grvcoelho/react-voice-components

Download react-voice-components

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/react-voice-components/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>react-voice-components</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/react-voice-components/
implementation 'org.webjars.npm:react-voice-components:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/react-voice-components/
implementation ("org.webjars.npm:react-voice-components:1.0.0")
'org.webjars.npm:react-voice-components:jar:1.0.0'
<dependency org="org.webjars.npm" name="react-voice-components" rev="1.0.0">
  <artifact name="react-voice-components" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='react-voice-components', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "react-voice-components" % "1.0.0"
[org.webjars.npm/react-voice-components "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : react jar [15.4.1,16)

Project Modules

There are no modules declared in this project.

react-voice-components

Build Status

Set of React components that use the Web Speech API to bring voice experience to React applications. Check out the โœจ ๐Ÿ’Ž LIVE DEMO ๐Ÿ’Ž โœจ

Install

Install the components using npm:

$ npm install --save react-voice-components

Usage

  1. Import components:
import { VoicePlayer, VoiceRecognition } from 'react-voice-components'
  1. Use it:
ReactDOM.render(
  <VoicePlayer
    play
    text="React voice player demonstration"
  />,
  document.getElementById('root')
)

API

<VoicePlayer />

Provides you a simple React component to do speech synthesis (text to speech).

Options

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.

Event Callbacks

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.

<VoiceRecognition />

Provides you a simple React component to do voice recognition (speech to text).

Options

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)

Event Callbacks

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.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

LICENSE

MIT (c) 2017 Guilherme Rv Coelho

Versions

Version
1.0.0