How do I set credentials for google speech to text without setting environment variable?
问题 There is C# example client-libraries-usage-csharp of using the lib. And there is example how to set an evironment variable export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/[FILE_NAME].json" How do I set credentials for google speech to text without setting environment variable? Somehow like this: var credentials = ...create(file.json); var speech = SpeechClient.Create(credentials); 回答1: using Grpc.Auth; then string keyPath = "key.json"; GoogleCredential googleCredential; using