steelejay / LowkeySpeech

Google Speech API in Unity (C#)
43 stars 19 forks source link

Hi! I just cloned your repo and made it work in 2018, can i submit a pull request? #2

Closed LukasMeine closed 5 years ago

LukasMeine commented 6 years ago

.

hexicle commented 6 years ago

Just some notes for anyone trying out Lukas's fork. Lukas's fork works with the latest version of Google Cloud. This is a great update.

If it appears not to be working, please try inspecting the second response in the console more closely When you try out the sample project, it will look as if the response is always empty. This is because in GoogleVoiceSpeech.cs, line 133 logs and line 144 prints to the user interface an empty response string. Therefore it would seem like the API is not providing a response. However, line 202 logs the response appropriately with the correct response. This is because unlike the first two lines, line 202 actually runs after the response is received. To inspect this result, open the console in Unity, and click the log which says

[01:23:45] Response:{
  "results": [

Although it looks like it is just an empty response like the first two outputs would suggest, actually when you expand it it will showthe full response:

Response:{
  "results": [
    {
      "alternatives": [
        {
          "transcript": "hello world",
          "confidence": 0.9872826
        }
      ]
    }
  ]
}
steelejay commented 6 years ago

Sorry for the delay, I don't check github that much. Go for it, Lukas. Will it still work with older versions of Unity?

LukasMeine commented 6 years ago

Not sure, but I think so.

steelejay commented 6 years ago

Go for it. If you say the current version isn't working anyway... it's still progress. ;)

LukasMeine commented 5 years ago

@hexicle @steelejay Just submited the pull request. Guess this can be closed now.

steelejay commented 5 years ago

Just did the merge, apologies for the delay. Lot going on right now. Thanks.