Google Cloud Speech to Text API - Speaker Diarization

与世无争的帅哥 提交于 2019-12-23 04:08:04

问题


When i am trying to do a speech to text transcribe of a live phone call using web socket.

Already included

const Speech = require('@google-cloud/speech').v1p1beta1;

const speech = new Speech.SpeechClient();

With following config.

encoding: 'LINEAR16',
sampleRateHertz: 8000,
languageCode: 'en-US',
useEnhanced: true,
enableSpeakerDiarization: true,
diarizationSpeakerCount: 2,
enableWordConfidence: true,
model: `phone_call`,

I am getting following response

{
  "results": [
    {
      "alternatives": [
        {
          "words": [],
          "transcript": " what I'm trying to do is",
          "confidence": 0.778500497341156
        }
      ],
      "isFinal": true,
      "stability": 0
    }
  ],
  "error": null,
  "speechEventType": "SPEECH_EVENT_UNSPECIFIED"
}

Do you guys know why i am not getting speaker diarization in the response from the google cloud for the above config?

来源:https://stackoverflow.com/questions/56514843/google-cloud-speech-to-text-api-speaker-diarization

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!