
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
A React component that synthesis text into speech using Web Speech API
A React component that synthesis text into speech using Web Speech API.
This project scaffold can be found at compulim/react-component-template
.
Try out the demo at https://compulim.github.io/react-say/.
First, run npm install react-say
for production build. Or run npm install react-say@master
for latest development build.
The following will speak the text immediately upon showing up. Some browsers may not speak the text until the user interacted with the page.
import BasicSay from 'react-say';
export default props =>
<BasicSay
text="A quick brown fox jumped over the lazy dogs."
/>
You may want to customize the speech by varying pitch and rate. You can use <Composer>
and <Say>
to say your text.
import { Composer, Say } from 'react-say';
export default props =>
<Composer
pitch={ 1.1 }
rate={ 1.5 }
>
<Say
text="A quick brown fox jumped over the lazy dogs."
/>
</Composer>
Note: variation will take effect for new/modified
<Say>
Since some browsers may block speak synthesis before the user interacting with the page, you can use <SayButton>
for the purpose.
import { Composer, SayButton } from 'react-say';
export default props =>
<Composer>
<SayButton
onClick={ event => console.log(event) }
text="A quick brown fox jumped over the lazy dogs."
>
Tell me a story
</SayButton>
</Composer>
Like us? Star us.
Want to make it better? File us an issue.
Don't like something you see? Submit a pull request.
FAQs
[](https://badge.fury.io/js/react-say) [](https://travis-ci.org/compulim/react-say)
The npm package react-say receives a total of 7,536 weekly downloads. As such, react-say popularity was classified as popular.
We found that react-say demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.