使用android sdk的ibm watson语音与文本api中的扬声器标签不一致

时间:2019-02-17 15:10:15

标签: ibm-watson speech-to-text android-sdk-tools

当我尝试演示时,将音频转录为文本非常准确,这就是演示中的输出

Speaker 0: Hello.
Speaker 1: Hi is this Tina.
Speaker 0: Yes it is who is this.

这是我的输出

Speaker 0: Hello.
Speaker 1: Hi is this Tina.
Speaker 0: Yes it is this this

这是我在识别中设置的

private RecognizeOptions getRecognizeOptions(InputStream captureStream) {
return new RecognizeOptions.Builder()
.audio(captureStream)
.contentType(HttpMediaType.AUDIO_MP3)
.model("en-US_NarrowbandModel")
.interimResults(true)
.inactivityTimeout(-1)
.timestamps(true)
.speakerLabels(true)
.smartFormatting(true)
.build();
}

当我尝试将模型更改为en-USBroadband时,输出为

Speaker 0:Hello.
Speaker 1:Hi is this Tina. Yes it is who is this

区别是,是的,这是谁,谁是另一位发言人,所以预期结果将是这样

Speaker 0: Hello.
Speaker 1: Hi is this Tina.
Speaker 0: Yes it is who is this.

请帮助解决此错误,或者我使用mp3文件而不是wav文件的方式对我的代码有错误

0 个答案:

没有答案