I'm try to send an method to the scene, but JS say me is not a function.
This is an example: https://jsfiddle.net/moku23/05ycdsvr/5/
There is no function called say me or sayme or say.
There are three main speech functions that you should become familiar with -
1. sayAudio - to speak previously uploaded or recorded audios
2. sayText - for realtime Text-to-Speech audio
3. sayAI - for user interaction with your SitePal Bot (or 3rd party bot)
To become more familiiar with using our API I recommend reading the introduction section in our Client API reference document on our support page.
Here is a direct link -
On our support page - www.sitepal.com/support - you will also find links to dozens of technical examples demonstrating how to use our API. Please peruse those examples, and feel free to copy their source code to your own page to get started.
Regarding the test page you shared above - In your page you are trying to call the function saySilent (please look un in the reference doc what it does). But it will not work before your character has loaded.
You should use the callback function vh_sceneLoaded to find out when it is safe to call the API.
Finally, if you have specific questions - please send us a note to firstname.lastname@example.org - and we will be happy to look into and advise.
I hope this helps,
ps. great character!
Ok, but how can I use saySilent(10)?
You want to make sure the call to saySilent (or any other api function) is made after your SitePal character is loaded. To that end, use vh_sceneLoaded callback to verifyScene has loaded before making any API call.
So you can make the call in the callback itself.
Or, make the call in response to user action.
Here's a technical example that demonstrates the latter -
Hope this helps.
Customer support service by UserEcho