Appendix C: Word Accompaniment


In BodyChat utterances are broken into words that are displayed one by one above the avatar’s head. The method AccompanyWord(Cstring word) is called for each word, allowing the avatar to take action based on the words spoken. The current implementation spots a few keywords and punctuation markers and selects an appropriate conversational phenomenon for accompaniment. The mapping presented here is a simple demonstration, but it is easily extendable to elicit a wider range of behaviors.



AccompanyWord(Cstring word) { 
	if(word.GetLength()>0) {
		word.MakeLower(); 
		if(word[0]=='*') Emphasize(); 	// Allows user to emphasize any word 
		if(word.Find("you")  > -1) Beat();	// A slight hand wave 
		if(word.Find("this") > -1) Beat(); 
		if(word.Find("very") > -1) Emphasize();
		if(word.Find("yes")  > -1) Emphasize();
		if(word.Find("aha")  > -1) Emphasize();
		if(word.Find(',') > -1) RequestFeedback(); 
		if(word.Find('.') > -1) RequestFeedback(); 
		if(word.Left(1)=='?') RequestFeedback(); 
		if(word.Left(1)=='!') RequestFeedback(); 
		// --
		// Add more actions here 
		// -- 
	} 
}