JAVA using google speech recognition API

前端 未结 1 393
遇见更好的自我
遇见更好的自我 2020-12-28 23:02

I\'m trying to use google speech recognition API. Here\'s the code i\'ve written:

http://pastebin.com/zJEhnJ74

It works. I get an answer from the server:

相关标签:
1条回答
  • 2020-12-28 23:36

    You must use wr.write(data); instead of wr.writeBytes(new String(data));

    Google answer:

    {"status":0,"id":"e0f4ced346ad18bbb81756ed4d639164-1","hypotheses":[{"utterance":"hello how are you","confidence":0.94028234},{"utterance":"hello how r you"},{"utterance":"hello how are u"},{"utterance":"hello how are you in"}]}
    
    0 讨论(0)
提交回复
热议问题