How to get audio file with the method recognizeOnceAsync of SpeechSDK.SpeechRecognizer?

MarsOnly 5 Reputation points
2023-07-07T10:09:45.7133333+00:00

I'm using the demo code from https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/quickstart/javascript/browser/from-microphone/index.html

like this below

recognizer.recognizing = (s, e) => { console.log(RECOGNIZING: Text=${e.result.text}); }; recognizer.recognized = (s, e) => { if (e.result.reason == sdk.ResultReason.RecognizedSpeech) { console.log(RECOGNIZED: Text=${e.result.text}); } else if (e.result.reason == sdk.ResultReason.NoMatch) { console.log("NOMATCH: Speech could not be recognized."); } }; recognizer.canceled = (s, e) => { console.log(CANCELED: Reason=${e.reason}); if (e.reason == sdk.CancellationReason.Error) { console.log("CANCELED: ErrorCode=${e.errorCode}); console.log("CANCELED: ErrorDetails=${e.errorDetails});
i want to get the audio file from the microphone with the sdk, but i can not find any solution in the document of microsoft-cognitiveservices-speech-sdk.

is there any possible to get the audio file with the sdk?

Azure AI Speech
Azure AI Speech
An Azure service that integrates speech processing into apps and services.
1,506 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,054 questions
{count} votes