Search This Blog

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


Friday, September 29, 2017

Android library - that need to check

i get into those libraries , i suggest to check them (maybe there are better)




https://www.acrobits.net/products/corporate/sdk




https://www.intercom.com/



Tuesday, September 26, 2017

Finding Memory Leaks Using the CRT Library

big like !!

for debug purpose

Finding Memory Leaks Using the CRT Library:





syntax sample !!



_CrtMemState s1,s2,s3;

_CrtMemCheckpoint(&s1);



//to do - add your code here



_CrtMemCheckpoint(&s2);

if (_CrtMemDifference(&s3, &s1, &s2))

_CrtMemDumpStatistics(&s3);