Skip to content

Instantly share code, notes, and snippets.

@savelee
Created April 8, 2020 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save savelee/fcd1c22b55e2b64420a10938584dacba to your computer and use it in GitHub Desktop.
Save savelee/fcd1c22b55e2b64420a10938584dacba to your computer and use it in GitHub Desktop.
Dialogflow Streaming
// 1)
sessionId = uuid.v4();
// 2)
sessionClient = new df.SessionsClient();
sessionPath = sessionClient.sessionPath(projectId, sessionId);
// 3)
request = {
session: sessionPath,
queryInput: {
// 4)
audioConfig: {
sampleRateHertz: sampleRateHertz,
encoding: encoding,
languageCode: languageCode
},
singleUtterance: singleUtterance
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment