语音转文字

时间:2020-05-01 21:32:00

标签: google-cloud-speech

curl -s --ssl-no-revoke -H“授权:承载$(gcloud auth应用程序默认打印访问令牌)” https://speech.googleapis.com/v1/speech:recognize -d @ sync-request.json> output.txt

运行此命令时,出现错误:

{
  "error": {
    "code": 401,
    "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED"

我以前曾在Mac上成功运行过。我已经获取了我的.JSON文件,并根据要求将其放入环境变量中。我不确定在这里做什么。

0 个答案:

没有答案