views:

2441

answers:

3

In Android, you can say something and it will search it for Google. Google can turn speech into text.

How can I leverage this API?

+3  A: 

There’s no official API for the text-to-speech service. But Weston Ruter noticed that anyone can access the service in the same way Google does: “Looking at the Firebug Net panel for where this TTS data was coming from, I saw that the speech audio is in MP3 format and is queried via a simple HTTP GET (REST) request: http://translate.google.com/translate_tts?tl=en&q=text

Translation: just change the URL to whatever you want it to say and you’ll get back a MP3 file. Example: copy the URL http://translate.google.com/translate_tts?q=I+love+techcrunch into your browser.

source: http://www.techcrunch.com/2009/12/14/the-unofficial-google-text-to-speech-api/

Balon
he is looking for speech-to-text, not text-to-speech. This is still an insanely cool feature though. thanks.
darren
oh, my bad, sorry :) but I'll leave my answer because it is cool feature as you said!
Balon
For Text To Speech, there is a TTS API that you can import in your Android project. But what about Speech To Text? Any clue?
Maxood
+6  A: 

Have a look at RecognizerIntent. "String ACTION_RECOGNIZE_SPEECH Starts an activity that will prompt the user for speech and sends it through a speech recognizer."

Ryan Kennedy