Search This Blog

Sunday, October 22, 2017

QnA Maker - the easy way to create a BOT

Build, train and publish a simple question and answer bot based on FAQ URLs, structured documents or editorial content in minutes.
QnA Maker:



great video tutorial









Saturday, October 21, 2017

ngrok - secure tunnels to localhost

ngrok - secure introspectable tunnels to localhost:


to work with your local IIS EXPRESS under visual studio use this:

ngrok http -host-header="localhost:58821" 58821

where 58821 is your port number

more details - how to use ngrok with windows and visual studio to test webhooks

Friday, October 6, 2017

Google Speech API

Great service from google to transcript sound into text.
an easy way to use curl command below.

open command shell (cmd on windows)
set your google  API_KEY

set API_KEY=xxxxxxxxxxxx-xxxxxxxxxx

request.json file should contains such data
{
  "config": {
      "encoding":"FLAC",
      "sampleRateHertz": 16000,
      "languageCode": "en-US",
      "enableWordTimeOffsets": false
  },
  "audio": {
      "uri":"gs://cloud-samples-tests/speech/brooklyn.flac"
  }
}
run the command to get response

curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json "https://speech.googleapis.com/v1/speech:recognize?key=%API_KEY%"

for long file (above 1 minute )use such command
curl -s -X POST -H "Content-Type: application/json" --data-binary @request.json "https://speech.googleapis.com/v1/speech:longrunningrecognize?key=%API_KEY%"

you will get response such as
{
  "name": "9111777455024812345"
}

use the name value to get result of the long process

curl -s -X GET  "https://speech.googleapis.com/v1/operations/9111777455024812345?key=%API_KEY%"


more info :
https://cloud.google.com/speech/docs/getting-started
https://codelabs.developers.google.com/codelabs/cloud-speech-intro/index.html#0