I created a console application using C #. I used google cloud speech api. I followed this example application to create an application. To authenticate api speech, I wrote the following code in the main method
Environment.SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", "path-to-json-file", EnvironmentVariableTarget.Process);
Everything works perfectly. My problem, I have to send exe along with the json file. I do not want to open the json file. How can I embed the contents of a json file in code or authenticate without a json file? so that I can send exe only to the user.
Any help on this would be appreciated.
Thank.
source
share