1.0.2 • Published 11 months ago

speech2json v1.0.2

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

speech2json

This is a Speech Recognization library used wit.ai api.

Install

Using NPM:

$ npm install speech2json

Using YARN:

$ yarn add speech2json

Usage

Autoload .env file to process.env.

Try get Wit Access Token from environment variable WIT_ACCESS_TOKEN by default.

import speech2json from 'speech2json';
import fs from 'fs';

console.log(await speech2json(fs.readFileSync('./data/test.wav'), { type: 'audio/wav', token: process.env.WIT_ACCESS_TOKEN }));

console.log(await speech2json('https://example.com/test.wav', { type: 'audio/wav' }));

Wit Access Token

After creating your app at wit.ai, you can find your access token in the app's Settings tab.