speech-to-text-api

1.0.3 • Public • Published

Installing

Using npm:

$ npm install speech-to-text-api

Config

Step 1

Enable the Cloud Speech API. Cloud Platform Console

Step 2

Initialize googleApiKey. Google Cloud API

googleApiKey: ""

Example

import SpeechApi from 'speech-to-text-api'
// default { encoding: 'LINEAR16', sampleRateHertz: 44100, languageCode: 'th-TH' }
const speechApi = new SpeechApi('google-cloud-api-key')
// or https://cloud.google.com/speech-to-text/docs/reference/rest/v1/RecognitionConfig
const speechApi = new SpeechApi('google-cloud-api-key', { encoding: 'LINEAR16', sampleRateHertz: 44100, languageCode: 'th-TH' })
 
// start speech
await speechApi.start()
 
// result text
const result = await speechApi.stop()

Readme

Keywords

none

Package Sidebar

Install

npm i speech-to-text-api

Weekly Downloads

3

Version

1.0.3

License

ISC

Unpacked Size

16.6 kB

Total Files

4

Last publish

Collaborators

  • zesani