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 6, 2023
1 parent 8d4f8e2 commit 467e4a2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ const azureCogSearchEndpoint = "https://static-webapp-avatar.search.windows.net"
const azureCogSearchApiKey = "GQemWa1Jk2KSO89crwqYbiaHFVh1OqVhMhrfYGvAfdAzSeCy37rz"
const azureCogSearchIndexName = "products"

// This is the only avatar which supports live streaming so far, please don't modify
const TalkingAvatarCharacter = "lisa"
const TalkingAvatarStyle = "casual-sitting"

supported_languages = ["en-US", "de-DE", "zh-CN", "ar-AE"] // The language detection engine supports a maximum of 4 languages

const BackgroundColor = '#FFFFFFFF'
Expand Down Expand Up @@ -286,10 +282,12 @@ window.startSession = () => {
//speechSynthesisConfig.endpointId = document.getElementById('customVoiceEndpointId').value
speechSynthesisConfig.speechSynthesisVoiceName = ttsVoice


const avatarConfig = SpeechSDK.AvatarConfig(TalkingAvatarCharacter, TalkingAvatarStyle)
// This is the only avatar which supports live streaming so far, please don't modify
const TalkingAvatarCharacter = "lisa"
const TalkingAvatarStyle = "casual-sitting"
const avatarConfig = new SpeechSDK.AvatarConfig(TalkingAvatarCharacter, TalkingAvatarStyle)
//avatarConfig.customized = document.getElementById('customizedAvatar').checked
avatarSynthesizer = SpeechSDK.AvatarSynthesizer(speechSynthesisConfig, avatarConfig)
avatarSynthesizer = new SpeechSDK.AvatarSynthesizer(speechSynthesisConfig, avatarConfig)
avatarSynthesizer.avatarEventReceived = function (s, e) {
var offsetMessage = ", offset from session start: " + e.offset / 10000 + "ms."
if (e.offset === 0) {
Expand Down

0 comments on commit 467e4a2

Please sign in to comment.