@lite-v3/speech-to-text
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@lite-v3/lite-speech-to-text

Basic utility package to convert speech input to text input

By Tokopedia Version

Installation

Install deps

# Use pnpm
pnpm add @lite-v3/speech-to-text

# Use npm
npm i @lite-v3/lite-speech-to-text

# Use yarn
yarn add @lite-v3/lite-speech-to-text

Hooks

useSpeechToText

React hook to use the browser speechRecognition's API

Usage

useSpeechToText

import { useSpeechToText } from '@lite-v3/speech-to-text';

const { listening, startListening, abortListening } = useSpeechToText({
  lang: 'id-ID',
  isListeningAnything: false,
  onSpeechEnd: handleSpeechEnd,
});

const handleSpeechIconClick = () => {
  if (!listening) {
    startListening();
  } else {
    abortListening();
  }
};

return <div onClick={handleSpeechIconClick} />;

Code By WPE Team @Tokopedia

Readme

Keywords

none

Package Sidebar

Install

npm i @lite-v3/speech-to-text

Weekly Downloads

358

Version

1.1.0

License

ISC

Unpacked Size

8.69 kB

Total Files

7

Last publish

Collaborators

  • miqdadfwz
  • maafaishal-tkpd
  • 1nd
  • skipper.team