【发布时间】:2020-04-04 10:34:39
【问题描述】:
我正在使用 Microsoft 的 Speech SDK for JavaScript 转录麦克风流。录制和转录都是使用语音 SDK 完成的,我无法找到在录制完成后如何访问和保存录制的音频文件的方法。
用于创建记录器和记录的代码
recognizer = new SpeechSDK.SpeechRecognizer(speechConfig, audioConfig);
// to start the recording
recognizer.startContinuousRecognitionAsync(
() => {
portFromCS.postMessage({ type: "started", data: "" });
},
err => {
recognizer.close();
},
);
// used after user input to stop the recording
recognizer.stopContinuousRecognitionAsync(
() => {
window.console.log("successfully stopped");
// TODO: somehow need to save the file
},
err => {
window.console.log("error on stop", err);
},
);
documentation 相当糟糕,我无法找到如何使用他们的 SDK 访问原始音频的内置方法。我唯一的选择是使用两个音频流进行录制并使用单独的录制流保存文件吗?这意味着什么?
【问题讨论】:
标签: javascript audio-recording speech-to-text microsoft-cognitive