Also, if you do want voice, you can customise the language and voice of your bot using the web speech API in JavaScript.
This would be helpful boiler plate for you which you can use to customise the one in the Chatscript WEBINTERFACE/SPEECH/speech.php file which I presume you are using:
// TTS code taken and modified from here:
// http://stephenwalther.com/archive/2015/01/05/using-html5-speech-recognition-and-text-to-speech
//---------------------------------------------------------------------------------------------------
// say a message
function speak(text, callback) {
var u = new SpeechSynthesisUtterance();
u.text = text;
u.lang = 'fr-FR';
// u.lang = 'en-US';
//u.lang = 'en-GB';
u.voice = 4; // 3 = american female 0 worse female 1 = not best femal
u.rate = 1.0; // .85
u.pitch = .9;
u.volume = 1.0; // .5
My own speech code is different to the CS boiler plate, but assuming you are using CS you can see that there is a u.lang key with value ‘fr-FR’. Your bot will now be able to speak French if fed French text and associated with a French voice. Below it I have commented out the American and British English equivalents. You can choose which you can use, as long as only one is uncommented.
The second key element, which is the one you’re having trouble with, is the u.voice. If you keep changing the numbers you will eventually find one that has the right accent for you. For instance for me 6 is a posh British man, where 22 is a Spanish speaker. In Chrome voice 9 is French. Try different numbers until you get what you like.
Having said that, the web speech API can be tricky in terms of ensuring consistency of voices across platforms. It taps into the voice synthesis (and recognition) systems of each OS and even browser in the case of Chrome, so what you hear in your computer may not be what others hear on different platforms, so worth cross-platform testing if this matters in your implementation.
For now, if you want to have speech enabled, but don’t want a garbled accent, just ensure the lang setting is set to the language you want and either comment out the voice parameter (the default will be for the api to find the voice that best matches the language) or else play around with different numbers until you find the voice you like.