嗨,我想用IBM Watson库的speech to text录制运行的视频。我的代码是:
new RecognizeOptions.Builder()
.audio(audio)
.contentType("audio/mp3")
.model("en-US_BroadbandModel")
.interimResults(true)
.inactivityTimeout(2000)
//TODO: Uncomment this to enable Speaker Diarization
.speakerLabels(true)
.build();我收到以下错误: java.lang.RuntimeException:无法转码数据流音频/mpeg ->音频/x-java.lang.RuntimeException-->
请帮帮忙。
发布于 2019-05-23 21:15:14
您需要通过类似ffmpeg之类的方法来传递视频,以提取音频轨道,并将音频轨道传递给Speech to Text Service。
https://stackoverflow.com/questions/56259184
复制相似问题