Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to send audio file to the speech-to-text recognition

I want the Android speech recognition system analysing audio file and not the default incoming voice from microphone.

Is there any way to do that ?

Thank you.

like image 810
nonozor Avatar asked Nov 15 '10 22:11

nonozor


People also ask

How can I convert speech voice recording to text?

There are two primary options to convert voice recordings to text documents. You can either use AI transcription or human transcription services. AI transcription is quicker and more affordable, but less accurate than human transcription.

Is there a program that will transcribe audio to text?

There are two primary options to convert audio into text. You can either use Rev's auto audio transcription (voice recognition online software) or human audio transcription services (human-based transcription). Our online transcription software is quicker and more affordable, but less accurate than human transcription.

Can Google transcribe audio to text?

Activate Voice Typing in Google Docs. Begin transcribing your audio. Once you've chosen a language, click the microphone and start speaking. Voice Typing will transcribe whatever is coming through your computer microphone.


2 Answers

I suppose it works in a similar way to the chrome api - http://mikepultz.com/2011/03/accessing-google-speech-api-chrome-11/

As he has mentioned you can convert the microphone file into a .flac file and send it to the speech api, and you will get the same result. So you can use SOX and convert it yourself.

Hope it helps. Dias

like image 98
wizgot Avatar answered Oct 21 '22 11:10

wizgot


cmusphinx.sourceforge.net/wiki/tutorialandroid Just found that link sounds like someone has created a android version of Sphinx.

Looking at the Android api doing this doesn't seem to be supported. (http://developer.android.com/reference/android/speech/package-summary.html)

You might be able to using another API.

I know that Microsoft's C# api allows this but in order for that to be useful you would probably need to setup a server with a program you wrote record the sound file on the phone and then send it to the server.

CMUSphinx (http://cmusphinx.sourceforge.net/wiki/) is written in Java so it might be possible to get it running on an Android device. On that api you create a StreamSpeechReconizer.

StreamSpeechRecognizer recognizer = new StreamSpeechRecognizer(configuration);
recognizer.startRecognition(new File("speech.wav").toURI().toURL());
SpeechResult result = recognizer.getResult();
recognizer.stopRecognition();

I found this https://gist.github.com/alotaiba/1730160 with a quick web search (google "speech recognition api accepts file") so there might be other services available on the web that would accept a file to be sent to them.

like image 44
Travis Avatar answered Oct 21 '22 12:10

Travis