Android Speech Recognition Without Dialog In A Custom Activity - Truiton: "Speech Recognition"
a simple working sample could be found here
android-speech-recognizer-sample
good hint to make it like 'real time'
android-recognitionlistener-live-speech-to-text-preview
This Blog is first of all memos for me!! From time to time I get exposed to new and cool stuff for developers and architects ,most of the time its a solution for a problem or tips or tricks, so, I would like to track my memos and share it with you, it can save your time and nervous, I hope you will enjoy it - by Yaniv Tzanany.
Search This Blog
Showing posts with label speech. Show all posts
Showing posts with label speech. Show all posts
Sunday, October 8, 2017
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
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
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 responsecurl -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
Subscribe to:
Posts (Atom)