1.0.10 • Published 3 years ago

react-hook-text-to-speech v1.0.10

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago