Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 395 Bytes

useSpeech.md

File metadata and controls

22 lines (15 loc) · 395 Bytes

useSpeech

React 用户界面钩子,用于合成说出给定字符串的人声。

用法

import {useSpeech} from 'react-use';

const Demo = () => {
  const state = useSpeech('Hello world!');

  return (
    <pre>
      {JSON.stringify(state, null, 2)}
    </pre>  
  );
};