问题
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