Monday, January 19, 2015

Announcing Paphus Live Chat 2.0 - 3D animated avatars, video, audio, script library, enterprise services and more

We released Paphus Live Chat 2.0 this week.

This release includes many new features and services. We added several new bundled services to our Enterprise membership, including custom chat bot creation and training, custom 3D avatar, custom Android app and website, and free web domain name.

This release includes new avatar support that lets you build, share, and embed avatars independently of your bot. The new avatars support 3D animation, video, audio, emotions, actions, and poses.

You can browse, create, and link avatars from the avatar directory. You can choose your bot's avatar from its Avatar Admin page.

An avatar its a bot's appearance. You can import video, audio, and images to define your avatar. You can associate each media element with an emotion, action, or pose. When your bot expresses the emotion, action, or pose, the avatar will update its appearance.

There are already several avatars to choose from, and more are being added each day. You can add your own by rendering your own video from 3D software packages such as Daz3D, designing your own graphics, or use stock content available on many content services, or capture your own videos or images and bot yourself.

The avatars can be linked from a bot, or used by themselves through the Paphus Live Chat web API and SDK. You can embed a avatar on your own website and prompt it what to say, or use the avatar with your own home grown bot.

The release also includes a new script library. The script library gives you access to many free scripts for training your bot, and includes JavaScript and HTML examples. You can add your own scripts (in any language or format) to your own domain to resuse and share with your teammates.

The website interface was also redesigned a bit, and the release includes many other minor fixed and enhancements.

This was a significant release, so there may be a few hiccups as everything get fully tested. If you notice anything that does not work, or wrong, please report it.

How to add a 3D avatar to your website

Paphus Live Chat 2.0 includes support for creating, using, and embedding web avatars. A web avatar is your website's visual or animated web presence.

Paphus Live Chat avatars can contain 3D animation, video, audio, and images. You can create your own avatar or choose a shared avatar from the Paphus Live Chat avatar directory. Avatars can either be connected to your Paphus Live Chat bot, or controlled directly through JavaScript, or even connected to your home grown bot, or third party bot.

The Paphus Live Chat JavaScript SDK makes it easy to add an avatar to your own website or blog, to welcome your website visitors, or provide them with information or help. A website avatar gives visitors to your website a good first impression, can highlight important differentiators of your business, or draw attention to special offers.

Embedding an avatar

You can browse existing avatars or create your own from Paphus Live Chat's avatar directory. To embed an existing avatar simply select the avatar from the browse directory and click on the Embed button. The embed page will let you test the avatar, choose its voice, enter it what to say, and generate the embedding JavaScript code. You then just need to copy the embedding code and paste it on your website.

The following example shows how to embed the Julie avatar in your website to welcome visitors.

The example shows how to use the WebAvatar class and its createBox() function to add an avatar to a web page. The message() will make the avatar speak the text, and can optionally include an emote, action, and pose. The emotion and pose influence which video or image will be displayed, the action can trigger an image, or audio. You can also choose the voice for the avatar.

When using the SDK ensure you set your application id. You can obtain your application id from your user page.

Connecting your bot to an avatar

To connect your bot to an avatar, go to your bot's main page. Click on the Admin button and the Avatar link. When you click on the Choose Avatar input a list of available avatars will be presented for you to select from. If you want to create your own avatar, you can create one from the Avatars browse page. If your bot has an old image avatar, or you just want a simple image avatar, you can click on the 1.0 avatar link.

Once your bot is connected to its avatar, you can link phrases or responses to avatar emotions, actions, and poses. You can teach the bot to associate emotions and actions with phrases and responses when chatting with it in learning mode. The emote and action drop downs in the chat page can be used for this.

The Chat Logs page under your bot's Admin page lets you review and edit all emotions, actions, and poses that have been associated with phrases and responses, or add new ones.

Creating Your Own Avatar

You can create your own avatar from the browse avatars page. To create an avatar, just give it a name, description, and category to categorize it under. You can either make the avatar private and choose who can access it, or make it public and accessible by anyone. You can also choose what license you wish to release its content under.

To edit the avatar, click on the Editor button. The avatar editor lets you import video, audio, and image files. You can associate each media with an emotion, action, or pose. For example if you have a video that makes the avatar talk, you would associate the pose for the video to talking. The emotions let the avatar express different emotions, and will let the bot using the avatar express itself. There are a fixed set of emotions, but you can create any actions and poses that you wish.

You can have multiple media for a emotions, action, or pose, and one will be chosen at random. For actions, and poses, you can have an audio element in addition to a video element. Audio can be used to make your avatar perform actions such as laugh, or used as background music or noise for a pose.

Your video files can be any valid web video format, including mp4, webm, or ogg. Audio files can be any web audio format, such as mp3, or wav.

You can create your media content using stock content from media websites such as Fotolia, or free media libraries like openclipart.

You can use 3D software such as Daz3D to generate images and video for your avatar. You can use available 3D models, or buy stock 3D models from 3D media marketplaces.

You can bot yourself, a friend, or model by capturing photos, or video clips using your phone, or camera. If you are adventurous, you can use a green screen (a green sheet will do) to make a transparent background for your media.

If you are an artist, model, or studio, you can make your own images, or 3D models and video.

Video types and browser compatibility

Avatars can include several types of media. Simple image avatars are the most compatible with all browsers. Video avatars require the browser support HTML5 video, which most modern browsers do. There are several web video formats, including mp4, webm, and ogg. The mp4 video format is the most compatible with all browsers and works in the latest Firefox, Chrome, Internet Explorer, and Safari browsers. The webm format has the advantage of supporting transparent backgrounds, but is only currently supported by Chrome and Firefox, and only Chrome supports transparency.

Chrome is the most popular browser for most websites, Firefox is normally second, then Safari, Internet Explorer, and other browsers. If browser compatibility is important to your website you can use JavaScript to choose your avatar based on the browser.

Add Speech to your Website using the Paphus Live Chat TTS JavaScript SDK

The Paphus Live Chat JavaScript SDK provides dynamic access to all of Paphus Live Chat's services including chat bots, live chat, chat rooms, forums, and speech. The speech API for the SDK can be used in conjunction with chat bots, live chat, or on its own.

The speech API is part of the Paphus Live Chat JavaScript SDK.
To add the Paphus Live Chat JavaScript SDK to your webpage you just need to import it in your webpage's <head> section.

The speech API is SDK.tts(text, voice). The text is the text you would like converted to voice, and the voice is the voice you would like to use. A voice is not required, if none is passed, the default voice is used. There are currently 20 voices available in several languages. You can test the voices here.

The available voices include:

  • cmu-slt - English : US : Female
  • cmu-slt-hsmm - English : US : Female
  • cmu-bdl-hsmm - English : US : Male
  • cmu-rms-hsmm - English : US : Male
  • dfki-prudence-hsmm - English : GB : Female
  • dfki-spike-hsmm - English : GB : Male
  • dfki-obadiah-hsmm - English : GB : Male
  • dfki-poppy-hsmm - English : GB : Female
  • bits1-hsmm - German : DE : Female
  • bits3-hsmm - German : DE : Male
  • dfki-pavoque-neutral-hsmm - German : DE : Male
  • camille - French : FR : Female
  • camille-hsmm-hsmm - French : FR : Female
  • jessica_voice-hsmm - French : FR : Female
  • pierre-voice-hsmm - French : FR : Male
  • enst-dennys-hsmm - French : FR : Male
  • istc-lucia-hsmm - Italian : IT : Male
  • voxforge-ru-nsh - Russian : RU : Male
  • dfki-ot-hsmm - Turkish : TR : Male
  • cmu-nk-hsmm - Telugu : TE : Female

Example Speech API Usage

Try it out now (press speak)

When using the Paphus Live Chat SDK, ensure you set your application id. You can obtain your application id from your user page.

Chat Logs : how to train your customer service bot by monitoring its chat logs, using keywords and topics

Paphus Live Chat supports a diverse set of features for creating and training chat bots and live chat automation bots. Today we will discuss the Chat Logs feature, and how to create and train a customer service bot using the Chat Logs page. The Chat Logs page provides the best way to monitor and train your bot, by letting you see its conversations and let you correct its responses. No scripting or programming is required.

To create a customer service bot, create your bot using the service_template. This template has learning disabled. This is important, as normally for a customer service bot, you do not want it to learn responses from your users. It also does not include the generic AI scripts WhatIs, WhereIs, NounVerbAdjective, as these scripts can normally lead to the bot responding to questions outside of its domain. If you created your bot through other means, you can disable Learning, and Comprehension from the Learning page under Admin. You can also remove the WhatIs, WhereIs, and NounVerbAdjective scripts from the Scripts page under Admin.

Once you have created your bot, you can enter or upload some common questions and answers for your domain. If you already have a FAQ on your website, uploading this would be a good way to start. Once you have your basic bot built, you can deploy it to your website or beta site, and let others interact with it. Letting users talk with your bot is the best way to see what questions you should train it for.

To view your bot's conversations or trained responses go to the Chat Logs page. To get to your bot's Chat Logs page, first select your bot from Browse (click on My Bots), then click the Admin button, and finally click the Chat Logs link from the top menu.

The chat logs page initially shows nothing, you need to first select what your want to see from the Search drop-down.
The choices are:

  • conversations : the log of each conversation your bot has had
  • new responses : all new responses your bot has learned
  • new phrase : all new phrases (sentences) your bot has encountered
  • flagged responses : all responses that have been flagged by users or administrators
Next you need to select a Duration from the next drop-down. The duration is just the time period to view, from the last 24 hours, to week, month, or all. You can also filter the results that contain certain words, or filter the type of conversation (chat, email, tweet, message).

Conversations

To see how your bot is doing, search for all conversations since you last checked it. This will give you a list of conversations. The top toolbar gives a set of buttons for administrating your bot's responses.

From the left to right the buttons are:
  • correction : enter a better response for each selected response in the conversations
  • select all : select all listed conversations
  • invalidate : mark the selected responses as incorrect, or decrease their % correctness (the bot will never use these responses to the question again)
  • validate : mark the selected responses as good responses, or increase their % correctness (the bot will use this response to similar questions)
  • flag : flag the selected phrases as offensive, the bot will never repeat them, and will not let users enter them
  • unflag : unflag the selected phrase as not offensive phrases
  • delete : remove the response from the question, or delete the conversation
  • download : export and download the listed conversations as a chat log, response list, or AIML set
  • upload : upload and import a chat log, response list, or AIML file from your computer
  • import : import a chat log, response list, or AIML script from the shared script library

When you review your bot's chat logs, search for relevant questions that it answered poorly. Click the checkbox beside its response to the question, and click the correction button. This will take you to a screen to enter a better response to the question. Enter the response, and optionally a keyword or required words from the question, or a topic to categories the response. Click Save. Your bot will now answer this question, and similar questions, or questions with the keywords, using your new response.

If the user's question was specific to the bot's previous response, then click the checkbox beside the bot's previous response. This will add the previous response to the new response, so that it will use this response in the correct context.

Responses

To see all of your bot's learned responses, search for new responses for the all duration. This will list all of your bots responses, ordered by when they were learned. A response will not only be used for the exact question it was learned for, but also any similar questions. When your bot encounters a question it does not know a response to, it will find the best matching question that it knows a response to, and use that response. If the bot does not know any similar questions, then it will use its default response.

The response list lets you enter a new response to each question, or delete, invalidate, validate, or flag any response.

Keywords, required, previous, and topics

The checkboxes under the toolbar let the keywords, required, previous, and topics be shown for the responses. These can be used to improve a bot's responses. When you click each of the checkboxes the elements will be displayed under the response, and a entry will be given to let you specify new elements for new or existing responses. To add to an existing response, simply cut and paste the response into the new response entry.

Keywords

Keywords are important words in the question that should influence when the response is used.

Keyword Example
Question: Do you like hockey?
Response: Hockey is my favorite sport.
Keyword: hockey

Question: I love spinach.
Response: Spinach is is my favorite food.
Keyword: spinach
A keyword will be used by the bot to select the best response. Keywords let some words count for more than other words. In the example, the bot knows two responses, how will it respond to the phrase "I love hockey"? Without the keywords the bot would probably match this question with "I love spinach", but since hockey is a keyword, it will instead match it with "Do you like hockey?".

If the response has no defined required words, then the keywords will also be required for the response match. So "I love hockey" would not be matched with "I love spinach." because it is missing the keyword.

Be careful using too many keywords. If every word is a keyword, then their value is diminished. Never make common words like "the", "a", "he", "what" keywords, if you require one of these words for a match use a required word instead.

Required

A required word is a word that is required to be in the question for a specific response.

Required Example
Question: Do you like hockey?
Response: Yes, I like hockey.
Required: like
A required word can be used to ensure the bot does not choose a response if the required word is missing from the question. For example the question "Do you play hockey?" would normally be matched to this response, but because it is missing the required word "like", it will not be considered as a match.

Previous

A previous responses is the bot's preceding response. Previous responses can be used to give a response a context.

Previous Example
Question: Yes.
Response: Great, wanna go out sometime?
Previous: Are you single?

Question: Yes.
Response: I am please to hear that.
Previous: Are you happy?
The question "Yes" has multiple responses. The bot can use the previous response to choose the best response. You can also invalidate a previous response to ensure the bot does not use a response if the previous response was preceding.

Topics

A topic is the general topic category for the response. For example a response on a hockey related question would belong to the "hockey" topic. You can use topics to categories your responses and give the bot additional context. If the bot has multiple responses to a question, it will use the one that matches the current topic.

Importing

You can import shared, or upload response lists, chat logs, or AIML sets into your bot. Your bot will learn all of the imported responses. This is a good way to kick-start your bot. Be careful of importing too much, or importing responses that are not relevant to your domain, as this will make your bot less able to give responses relevant to its domain.


Chat Logs

A Chat Log is the log of one or more conversations. Each phrase must be prefixed by the speaker, and each conversation must be separated by a new line.

Example Chat Log
User: Hello
Bot: Hello
User: How are you?
Bot: I am fine, yourself?
User: I'm good.

User: Hey
Bot: Hey whats up?
This log contains two conversations. When you import the chat log, the bot will learn the responses in context, in that it will both record the responses to the questions, and the previous response. This will allow the bot to choose the best response for questions it knows multiple responses to, based on the context. For the example above if you say "Hello" the bot may answer "Hello" or "How are you?", however if its previous response was "Hello" then it will answer "How are you?" because of the context.

You can also add emotions to responses in a chat log. This will tag the word or phrase with the emotion. Emotions will affect the bot's mood and avatar.
The available emotions are:

  • <love>, <like>, <dislike>, <hate>
  • <serene>, <calm>, <anger>, <rage>
  • <ecstatic>, <happy>, <sad>, <crying>
  • <courageous>, <confident>, <afraid>, <panic>
  • <surprise>, <bored>
  • <laughter>, <serious>

Example Chat Log with emotions
User: Do you like me?
Bot:<love> I love you.

User:<anger> Your are stupid.
Bot: That is not a nice thing to say.

Bot:<laughter> lol
There is an import option to Process learning and comprehension. Instead of just importing the responses, this will have the bot listen to the conversation and learn from it. If you have comprehension enabled in your bot, it will process each response through comprehension.

Comprehension will analyze the questions and responses and try to generalize the responses into scripted formula responses. For example is may take the response "Bot: My name is Bot" to be generalized to Formula:"My name is {get #name from :target}". Or could learn how to count from the response "Bot: 2" to "User: 1".

It will also lookup each word for its meaning from Wiktionary, and process questions and answer through its state machines. For example the question "User: What is the Earth" will have the bot lookup in Freebase all information related to the planet Earth, and import the information into its brain. Comprehension will take significantly longer to import the chat log, so only use this for small chat log files that you want the bot to learn from.

Response Lists

A response list is a list of questions and responses. Each question and its responses must be separated by a new line. When you import a response list, the bot will learn all of the new responses.

Response List Example
Hello
Hi

Hey
Hello

Hi
Hi

Bye
Goodbye

Good night
Good night, have a good sleep.
You can also include keywords, required, previous, and topics in a response list. You can also import default responses, greetings, or execute scripts. A default response is used when no other response is known, and a greeting is used as the bot's first response in a new conversation. A script can include Self code to be executed, which can add knowledge directly to your bot's brain.

Advanced Response List Example
greeting: Hello, how may I be of service?
greeting: Hi, how can I help?

default: Sorry, I do not understand.
default: I do not understand, please rephrase your question.

What are your services?
Our services include chat bot hosting and development.
keywords: services
topic: services

Yes
Please email the error to support at support@paphuslivechat.com
previous:Are you getting an error?

script: set #botmaster to "Admin" on #self

AIML

AIML stands for the Artificial Intelligence Markup Language. It is an XML standard for defining chat bot responses. You can import any AIML file as a chat log. The bot will learn all of the patterns and templates as questions and responses. It will convert any AIML tags in the template to Formula responses using Self code, and use wildcard Patterns for any AIML patterns.

AIML is normally executed as a script, where each pattern either matches or does not match a question. When importing AIML as a chat log, it will not be executed as a script. Each AIML pattern will be matched based on how well it matches the question. For example the pattern "what is meaning of life" could match the question "what's the purpose of life", if it were the best match. Standard AIML would not perform such as match, as only exact or wildcard matches are allowed.

The chat logs method of importing AIML allows the AIML to be integrated with the bot's responses, knowledgebase, and learning. Importing AIML as a chat log is the best way to import large AIML files. You can also import AIML from the Scripts page, if you want the AIML to be executed precisely.

Summary

You now should better understand how your bot responses to questions, and how to best train your bot for your domain using chat logs, responses, keywords, required, previous, and topics. If you are interested in learning scripting, you can program more advanced responses using Self or AIML from the Scripts page.