Error: 14 UNAVAILABLE: Connect Failed with Google Speech API

Error: 14 UNAVAILABLE: Connect Failed with Google Speech API

我们有一个基于 NodeJS 的 Google Cloud Speech API 组件,它在许多环境中都能正常工作,但在特定环境中,我们会遇到以下错误。

错误:14 不可用:连接失败

问题所在的任何指针。我们怀疑这与连接有关,但如何确认?

我认为您所做的有关启用 *.googleapis.com、speech.googleapis.com、oauth2.googleapis.com 的测试确认流量在您这边被阻止了。这样的 google 端点应该仍然可以访问以请求语音服务。

希望以下建议对您有所帮助:

  1. 流量被代理阻止。您引用的 link 应该有效,只需检查 NodeJS google-cloud-node. If you are using a programming language will need to set them up properly, this is a Java example 部分。

  2. 流量被防火墙阻止。由于涉及 Google 个云 IP,而且它们通常会发生变化,因此更具挑战性。在这种情况下,您可以使用命令 dig _netblocks.google.com txt 找出这些 IP,并在防火墙中配置它们以允许流量。

这个问题也与你的问题相关:What is the Endpoint/Port used for Google Cloud Speech API