Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 1.03 KB

README.md

File metadata and controls

23 lines (19 loc) · 1.03 KB

car-mvp-voice-unittest

This is a unit-test to interact API Google Dialogflow CX 3.0 to allow an end-user sends input to Dialogflow, and Dialogflow sends a response.

  • install node.js

  • npm install @google-cloud/dialogflow-cx

  • npm i file-saver

  • npm i wav

  • Set authentication google service : config GOOGLE_APPLICATION_CREDENTIALS in appConst.json or config enviroment as below: //https://cloud.google.com/docs/authentication/production#windows For PowerShell: $env:GOOGLE_APPLICATION_CREDENTIALS="KEY_PATH" Replace KEY_PATH with the path of the JSON file that contains your service account key. For command prompt: set GOOGLE_APPLICATION_CREDENTIALS=KEY_PATH

  • Config dialogflow CX information in appConst.json

  • Run : node index.js

  • Test cases:

    • Send a text and receive a text or list of text and audio file (optional from request).
    • Send an audio file and receive a text or list of text and audio file (optional from request).
    • Send a streaming file and receive a text or list of text and audio file (optional from request).