charisma-ai / charisma-sdk-js

Charisma.ai SDK for Javascript (browser)
MIT License
10 stars 3 forks source link

js sdk voice audio format smarter handling #37

Open John-A-J opened 5 months ago

John-A-J commented 5 months ago

“We’re noticing that when using a synthetic voice it sometimes doesn’t play correctly for the user. On Android, Gemelo voices aren’t playing and on iOS none of the voices are playing (Replica, Cereproc, Gemelo). Are there browser limitations to what synthetic voices we can use”

Advised that it would be an encoding mismatch and to make sure the audio format worked with the target browser.

then

We managed to fix the issue by removing “ogg” from the encoding array. This probably means that your sdk is only using the first element of that array even if that encoding gives an error (which is what we were seeing). conversation.setSpeechConfig({ encoding: [“mp3”], output: “buffer”, });