Skip to content

Add voices (input and output) to a web-friendly chatbot widget

License

Notifications You must be signed in to change notification settings

LastMileNow/LMN-Chat-Widget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LMN-Chat-Widget

Add voices (input and output) to a web-friendly chatbot widget

The text-only chat widget based on https://github.com/JiteshGaikwad/Chatbot-Widget

How to add chatbot to your website

add the following code to your website

      <div id="chatbot">initial content</div>
      <script type="text/javascript" src="static/js/chatbot.js"></script>

Change the /static/js/constants.js to point to different chatbot server. Change the /static/js/chatbot.js to modify the chatbot widget behavior.

To launch a local echo chatbot server, run the following command

cd api
python chatbot.py

References

I have added the voices to the Chatbot Widget:

Hot to get all the voices:

if (theVoice == null) {
    let voices = synth.getVoices();
    for(i = 0; i < voices.length ; i++) {
        if(voices[i].name === "Google UK English Male") {
            utterThis.voice = voices[i];
            theVoice = voices[i];
            console.log("Voice is set.");
            break;
        }
    }
}

Get free background

https://unsplash.com/

About

Add voices (input and output) to a web-friendly chatbot widget

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published