gpt4 book ai didi

speech-to-text - 如何从 Microsoft Cognitive 语音客户端库的 StartContinuousRecognitionAsync() 接收数据

转载 作者:行者123 更新时间:2023-12-04 21:31:04 27 4
gpt4 key购买 nike

无法找到如何从 StartContinuousRecognitionAsync() 获取数据,因为我想接收数据以便我只能在关键字之后处理数据。

最佳答案

尝试这个:

...

recognizer = new SpeechSDK.SpeechRecognizer(speechConfig, audioConfig);

recognizer.startContinuousRecognitionAsync(cb?: () => void, err?: (e: string) => void);

// The event recognizing signals that an intermediate recognition result is received.
recognizer.recognizing = function(s, e){
console.log('recognizing text', e.result.text);
};

// The event recognized signals that a final recognition result is received.
recognizer.recognized = function(s, e){
console.log('recognized text', e.result.text);
script += e.result.text;
};

关于speech-to-text - 如何从 Microsoft Cognitive 语音客户端库的 StartContinuousRecognitionAsync() 接收数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51593121/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com