<script src=”https://aka.ms/csspeech/jsbrowserpackageraw”></script>
<script>
const speechConfig = SpeechSDK.SpeechConfig.fromSubscription(“F5EOWB9IlLj60zN2XMOxIfBRC6jv7sIG22mZYEigTUCwt0XntV9IJQQJ99BJACYeBjFXJ3w3AAAAACOGQImK”, “useast”);
speechConfig.speechRecognitionLanguage = “en-US”;
const audioConfig = SpeechSDK.AudioConfig.fromDefaultMicrophoneInput();
const recognizer = new SpeechSDK.SpeechRecognizer(speechConfig, audioConfig);
recognizer.recognizeOnceAsync(result => {
console.log(“Recognized text:”, result.text);
document.getElementById(“translationOutput”).innerText = result.text;
});
</script>
