charisma-ai / charisma-sdk-js Goto Github PK
View Code? Open in Web Editor NEWCharisma.ai SDK for Javascript (browser)
License: MIT License
Charisma.ai SDK for Javascript (browser)
License: MIT License
Add all useful content
https://docs.google.com/document/d/1YPyuQW3LzcLLaFSh8vdlWa2ZAAx_79dq7zgP-nmAaTc/edit?pli=1
follow up by creating a ticket for react sdk and adding much the same to that readme too
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please delete the greenkeeper/initial
branch in this repository, and then remove and re-add this repository to the Greenkeeper App’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.
“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”,
});
It appears the browser hangs on to the underlying microphone track, resulting in the red 'listening' icon still appearing
There are currently two ChatModes that are sent from the react sdk. "Chat" and "Tap". When characters are talking and not expecting the player to talk, it would be good for there to be a ChatMode of "Character" (Or better name). That way, we can disable the chat when the player shouldn't be typing.
There are two speech recognition systems available in the Charisma JS SDK.
microphone.startListening()
uses the built-in browser SpeechRecognition
. It’s free, but it’s not available in every browser (such as Firefox). This is what the https://charisma.ai/ website editor uses in the chat tester/‘play’ page.playthrough.startSpeechRecognition()
is our premium alternative which leverages Deepgram (or AWS/Google) under the hood. It works in every browser and uses credits and the quality should be significantly superior.Regarding method 2), we recently shipped a fix in @charisma-ai/sdk
version 4.0.3
which resolves an issue with using an incorrect sample rate, leading to odd/garbled/no results in certain browsers.
Could I check you’re using method 2) and you’re on the latest version of the SDK (4.0.3)? If so, perhaps you could try either the AWS or Google engines by providing service: “unified:aws”
or service: “unified:google”
in the startSpeechRecognition
options, and see if that works any better?
There is a message called speech-recognition-started which we send to the client when the connection to the STT service has been initialised successfully. You can use onSpeechRecognitionStarted on a Playthrough to react to it.
You can also see messages in chrome dev tools if you inspect the WebSocket messages.
The STT custom options are described in more detail here so there might be options that can be set for better compatibility with different browsers.
and add a further ticket to address this sort of stuff in the react sdk, which might be done slightly differently
The SpeechRecognition API is now supported by all major browsers except Firefox – https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition#browser_compatibility
The readme / docs should be updated to reflect current browser compatibility (currently lists Chrome as the only supported browser). Maybe just linking to the compatibility table would be better than updating browsers in the readme.
major version release
Firefox doesn't support sampleRate
, so try getting it from the AudioContext
instead
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.