gpt4 book ai didi

node.js - Google Cloud 语音识别 grpc 版本与 VSCode Electron 版本不兼容

转载 作者:太空宇宙 更新时间:2023-11-03 23:56:54 28 4
gpt4 key购买 nike

我的目标是开发一个具有语音识别功能的 VS Code 扩展,最好是通过 Google 的 API。

尝试导入和使用 @google-cloud/speech 时,运行时会引发以下错误:

错误:@grpc/grpc-js 仅适用于 Node ^8.13.0 || >=10.10.0

VS Code(截至 2019 年 6 月 20 日)正在运行 Electron 3.18 和 Node.js 10.2.0。这是否意味着没有办法解决这个问题?

我正在关注本教程:https://cloud.google.com/speech-to-text/docs/streaming-recognize

最佳答案

听起来它应该从下一个版本开始工作。来自 preliminary 1.36 release notes :

The Electron version that VS Code runs on has been updated and brings with it an update to Node.js from 10.2.0 to 10.11.0. All extensions will now run on this newer version of Node.js.

为了确保这一点,您可以尝试 Insider's build .

一般来说,无法控制 VSCode 扩展运行的 Node 版本(请参阅 here ),所以我猜你在这里很幸运。 :)

关于node.js - Google Cloud 语音识别 grpc 版本与 VSCode Electron 版本不兼容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56692506/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com