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

react-blabla

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-blabla

A React text-to-speech component

  • 0.0.14
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

React Blabla 🗣

TypeScript

Demo

React hook for generating text-to-speech using the Web Speech API. Features include play, pause and stop controls, as well as karaoke style current word highlighting. Check out the demo!


yarn add react-blabla

How to


import { useBlabla } from 'react-blabla'

...

const saySomething = useBlabla({ text: 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum' });

return (
  <>
    <button onClick={saySomething.start}>Start</button>
    <button onClick={saySomething.pause}>Pause</button>
    <button onClick={saySomething.stop}>Stop</button>
  </>
)

ParamExample
text: stringText for speech
options?: objectOptions for speech, same as defined in the Web API
pitch: number
rate: number
volume: number
voice: SpeechSynthesisVoice

Get all voices

A hook to get all voices, or one by country code or name. Returns array if multiple matches to query, like language code, or single voice if name param is passed. If no param passed will return all voices available in browser.

import { useGetVoices } from 'react-blabla'

const voices = getVoices() 
// const voiceByName = getVoices({ name: 'Amelie' })
// const voicesByLanguage = getVoices({ language: 'en-US' })
Param
options?: object
language?: string
name?: string

Keywords

FAQs

Package last updated on 07 May 2021

Did you know?

Socket

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.

Install

Related posts

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