Kaljurand / K6nele

An Android app that offers speech-to-text user interfaces to other apps
http://kaljurand.github.io/K6nele/
Apache License 2.0
267 stars 83 forks source link

speech-to-text crashes everytime on 4.1.2 #30

Closed Kaljurand closed 9 years ago

Kaljurand commented 9 years ago

Original issue 26 created by Kaljurand on 2012-10-21T16:56:02.000Z:

What steps will reproduce the problem?

  1. tap on the red icon to talk
  2. talk 3 - 5 seconds
  3. stop talking and let it process the speech

What is the expected output? What do you see instead?

app crashes ( logcat attached )

What version of the product are you using? On what operating system?

android 4.1.2

Please provide any additional information below.

Kaljurand commented 9 years ago

Comment #1 originally posted by Kaljurand on 2012-10-21T22:19:52.000Z:

Thanks for the report! The fix will unfortunately have to wait until I get my hands on a v4.1 device. If possible you could also submit the standard Android crash report which might provide a more detailed stack trace. For that you probably need to install the app via the Google Play Store.

Kaljurand commented 9 years ago

Comment #2 originally posted by Kaljurand on 2012-10-29T17:31:36.000Z:

solution - i cloned the git project, compiled it on 4.1.2 using ant, and it installs works fine on GNexus running 4.1.2... Altho i need to switch the grammar to US-english i think.

Kaljurand commented 9 years ago

Comment #3 originally posted by Kaljurand on 2012-10-30T10:42:39.000Z:

I don't quite understand... Can you be more specific about what do you mean by

Kaljurand commented 9 years ago

Comment #4 originally posted by Kaljurand on 2012-10-30T13:44:57.000Z:

the first try with konele speech , i just get the apk from the web and install on 4.1.2 and got crashes... i posted about that and actually, i dont think its a problem because next , i got to git and clone the project 'k6nele' and it builds fine on 4.1 api level and installs fine and runs fine on the phone with 4.1.2 android...

im in the U.S and want english, instead of the default language ....

i either want to change the language to english from what it is on OR i just want to change the POST urls so they go to

https://www.google.com/speech-api/v1/recognize

instead of what is configured in the 'strings.xml'

thank u

Kaljurand commented 9 years ago

Comment #5 originally posted by Kaljurand on 2012-10-30T14:27:25.000Z:

Kõnele does not have a notion of "default language". An app developer can use the EXTRA_LANGUAGE extra (http://developer.android.com/reference/android/speech/RecognizerIntent.html#EXTRA_LANGUAGE) to set the speech recognition language.

Kõnele does however have a notion of "default speech recognition server" and the Kõnele settings UI can be used to override this server. Whatever the server is it must have an API that is compatible with http://bark.phon.ioc.ee/speech-api/v1/

If you want to use a non-compatible server then you could try to change net-speech-api (http://code.google.com/p/net-speech-api/). This is a small library that sits between Kõnele and the server. I.e. change its source, compile a new jar and recompile Kõnele with this new jar. This way you don't need to change Kõnele at all.

Note that Kõnele sends raw audio to the server. If the server only supports some compressed format (e.g. Flac) then you need to do some rewriting of Kõnele. Contributions to Kõnele in the area of compressed audio recording are very much welcome (see also Issue 4).

Regarding using Kõnele with Google's speech recognizer. Its API inspired the design of http://bark.phon.ioc.ee/speech-api/v1/ so the APIs are very similar but not identical, e.g. Kõnele adds support for speech recognition grammars. It's hard to say how similar the APIs are because Google's API is not publicly documented (as far as I know). Also, keep in mind that it might be illegal to use Google's recognizer from anywhere else than Google Voice Search.

Kaljurand commented 9 years ago

Comment #6 originally posted by Kaljurand on 2012-10-30T15:21:12.000Z:

thank you for your suggestions..

the git project looks very useful.

all i really want is a file-sink to attach handler to receive the buffer containing the audio so that

each chunk of audio sent to server ( speech-to-text ) also gets handled by a file-sink ( mime type 'audio/flac-x; 16000 )

then, there is an archive of audio for each text translation

Kaljurand commented 9 years ago

Comment #7 originally posted by Kaljurand on 2014-11-19T23:06:40.000Z:

In v0.8.44+ the recorded audio can be obtained by setting the extra android.speech.extra.GET_AUDIO = true. The audio is returned in the wav-format. Other formats are not yet supported. See also: https://github.com/Kaljurand/K6nele/commit/664824fb058610da6d2a03d6cd40edd3d84a7bf7

(Closing, the original issue seems to be resolved.)