开发者

Android Voice Recognition API

开发者 https://www.devze.com 2023-01-14 02:56 出处:网络
I am developing an app that requires the voice recognition to stay active for an entire minute. Upon reviewing the docs, I discovered

I am developing an app that requires the voice recognition to stay active for an entire minute. Upon reviewing the docs, I discovered "SPEECH_INPUT_MINIMUM_LENGTH_MILLIS" added to 2.2. However Google's default voice开发者_如何学JAVA recognition service doesn't seem to support it. Does anybody know a way that I could force voice recognition to last a minute?


Oh wow I hate crappy documentation. Apparently Google's voice recognition service does support SPEECH_INPUT_MINIMUM_LENGTH_MILLIS, but requires the input to be a long. Of course if you put in an integer when adding the extra, it will call the method looking for an int. Then it will throw a very nasty silent error. Just make sure you cast the number as a long, and the world will be good.

0

精彩评论

暂无评论...
验证码 换一张
取 消