Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

grace-recognition

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grace-recognition

A composition api for SpeechRecognition

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
8
-55.56%
Maintainers
1
Weekly downloads
 
Created
Source

grace-recognition

A composition api for SpeechSynthesis

NPM version Codacy Badge Test coverage npm download License

Sonar

DocumentationChange Log

Installing

# use pnpm
$ pnpm install grace-recognition

# use npm
$ npm install grace-recognition --save

# use yarn
$ yarn add grace-recognition

Usage

  • Simple use:
export type RecognitionEventType =
  | 'start'
  | 'audiostart'
  | 'soundstart'
  | 'speechstart'
  | 'result'
  | 'speechend'
  | 'soundend'
  | 'audioend'
  | 'end'
  | 'error'
  | 'nomatch'

export interface RecognitionOptions {
  preferTouchEvent: boolean
  lang: 'zh-CN' | string
  interimResults: boolean
  maxAlternatives: number
  continuous: boolean
  onStatusChange?: (
    status: RecognitionEventType,
    event: Event | SpeechRecognitionEvent | SpeechRecognitionErrorEvent
  ) => void
}

import GraceRecognition from 'grace-recognition'

const recognition = new GraceRecognition({
  continuous: true,
  onStatusChange: (
    status: RecognitionEventType,
    event: Event | SpeechRecognitionEvent | SpeechRecognitionErrorEvent
  ) => {}
})

recognition.start('very good')
recognition.recognition('powered by saqqdy<https://github.com/saqqdy>')
  • Using unpkg CDN:
<script src="https://unpkg.com/grace-recognition/1.0.0/dist/index.global.prod.js"></script>
<script>
  const recognition = new GraceRecognition()
</script>

Support & Issues

Please open an issue here.

License

MIT

Keywords

grace-recognition

FAQs

Package last updated on 23 Jun 2023

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