Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
s-swathib authored Dec 7, 2023
1 parent 1d85bfd commit e83cc56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const log = msg => {
document.getElementById('logging').innerHTML += msg + '<br>'
}

const sttLocale = "en-US"
const ttsVoice = "en-US-JennyMultilingualNeural" // Update this value if you want to use a different voice
const cogSvcRegion = "westus2" // Fill your Azure cognitive services region here, e.g. westus2
const IceServerUrl = "turn:relay.communication.microsoft.com:3478"
Expand Down Expand Up @@ -301,7 +302,7 @@ window.startSession = () => {
}

const speechRecognitionConfig = SpeechSDK.SpeechConfig.fromSubscription(cogSvcSubKey, cogSvcRegion)
speechRecognitionConfig.speechRecognitionLanguage = document.getElementById('sttLocale').value
speechRecognitionConfig.speechRecognitionLanguage = sttLocale
speechRecognizer = new SpeechSDK.SpeechRecognizer(speechRecognitionConfig, SpeechSDK.AudioConfig.fromDefaultMicrophoneInput())

//const azureOpenAIEndpoint = document.getElementById('azureOpenAIEndpoint').value
Expand Down

0 comments on commit e83cc56

Please sign in to comment.