1.0.10 • Published 1 year ago

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

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year 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

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago