1.0.1 • Published 2 years ago

@zoimeet/voice-flow v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

npm version Downloads

Zoimeet VoiceFlow Speech SDK for JavaScript

The Zoimeet VoiceFlow Speech SDK for JavaScript is the JavaScript version of the Zoimeet's VoiceFlow Speech SDK. Use this SDK to build voice workflow automation into your existing platform.

This Speech SDK supports browser integration with React as well as the Node.js environments.

Installing

For the latest stable version:

Using npm:

npm install @zoimeet/voice-flow

Using yarn:

yarn add @zoimeet/voice-flow

How to use

Get you workspace authentication token from VoiceFlow dashboard.

import { LiveStream } from "@zoimeet/voice-flow";

// To initiate Flow object, pass workspace authentication token and callback function
// Flow will send the callback response based on the actions with type 

let Flow = new LiveStream("<Your Auth Token>", (response) => {  
    console.log(response);
});


Flow.write(<audio data>); // Audio data must be passed as 16khz Buffer format.

// To stop Flow actions
Flow.stop();

// Send transcripts to Google Drive (* won't work if drive is not connected)
Flow.uploadToGoogleDrive(<Filename>); // Pass filename or Flow will upload with date string as filename

response object:

  • type - transcripts isFinal - True or False data - Transcripts
  • type - error * message - Error message