我可以在 Microsoft Azure 虚拟机中使用 google 云语音 api 吗?

Can I use google cloud speech api in microsoft azure vm?

我正在尝试在 Microsoft azure 机器(我安装了 asterisk 服务)中使用 google 云语音 API。是否有可能做到这一点。因为在 GCP 中我们有一个选项可以启用 'Allow all cloud API services'。但是在微软中我们没有启用的选项。如果我使用我收到以下错误。请通过 staktrace 帮助我。

注意:我们在 GCP 机器上有一个工作版本。现在我将它部署到微软虚拟机中(然后只有我收到这个错误)。

一个API可以通过互联网调用。如果机器被配置为能够连接到互联网而不是是的,你可以

查看您收到的错误,您的身份验证设置似乎有问题。

DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application.
For more information, please see https://cloud.google.com/docs/authentication/getting-started

如果您按照 Getting Started with Authentication 上链接文档中的说明进行操作,您应该可以开始了。

好像我不到一周前就回答了同样的问题。

请检查您是否为 asterisk 用户设置了凭据,而不是为 root 用户设置了凭据。 Asterisk 是 运行 在 asterisk 用户下。