🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

react-hook-text-to-speech

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hook-text-to-speech

Easy to use simple react hook for converting text into speech

1.0.10
latest
npm
Version published
Weekly downloads
1
-90%
Maintainers
1
Weekly downloads
 
Created
Source

react-hook-text-to-speech

react-hook-text-to-speech is a React hook ,which helps to convert any text to audio.

Installation

npm i react-hook-text-to-speech

Demo




import useTextToSpeech from 'react-hook-text-to-speech'
import {useState} from 'react';

function App() {
  const [text,setText]=useState('');
  const convert=useTextToSpeech();

  return (
    <div className="App">
      <input onChange={(e)=>setText(e.target.value)}/>
      <button onClick={()=>convert(text)}>click</button>
    </div>
  );
}

export default App;

Usage

Arguments of convert function

convert(Text,Speed,Volume)

ArgumentsData type
Textstring
SpeedNumber -> 0 to 1 (Optional)
VolumeNumber -> 0 to 1 (Optional)

License

[ISC]

Keywords

text-to-speech

FAQs

Package last updated on 11 Dec 2022

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