int cSemaineEmmaSender::processComponentMessage( cComponentMessage *_msg ) { if (isMessageType(_msg,"classificationResult")) { // determine origin by message's user-defined name, which can be set in the config file SMILE_IDBG(3,"received 'classificationResult' message"); if (!strcmp(_msg->msgname,"arousal")) sendArousalC(_msg); else if (!strcmp(_msg->msgname,"valence")) sendValenceC(_msg); else if (!strcmp(_msg->msgname,"interest")) sendInterestC(_msg); else if (!strcmp(_msg->msgname,"gender")) sendGender(_msg); else if (!strcmp(_msg->msgname,"power")) sendPowerC(_msg); else if (!strcmp(_msg->msgname,"intensity")) sendIntensityC(_msg); else if (!strcmp(_msg->msgname,"anticipation")) sendAnticipationC(_msg); return 1; // message was processed } else if (isMessageType(_msg,"pitchDirection")) { SMILE_IDBG(3,"received 'pitchDirection' message"); sendPitchDirection(_msg); return 1; // message was processed } else if (isMessageType(_msg,"asrKeywordOutput")) { SMILE_IDBG(3,"received 'asrKeywordOutput' message"); sendKeywords(_msg); return 1; // message was processed } else if (isMessageType(_msg,"turnSpeakingStatus")) { SMILE_IDBG(2,"received 'turnSpeakingStatus' message: %i",_msg->intData[0]); sendSpeakingStatus(_msg, _msg->intData[0]); return 1; // message was processed } return 0; // if message was not processed }
int cSemaineUserinfoSender::processComponentMessage( cComponentMessage *msg ) { if (isMessageType(msg,"classificationResult")) { if (!strcmp(msg->msgname, "gender")) { sendGender(msg); return 1; } else if (!strcmp(msg->msgname, "offtalk")) { sendOffTalk(msg); return 1; } } else if (isMessageType(msg, "speakerId")) { sendSpeakerId(msg); return 1; } else if (isMessageType(msg, "pitchDirection")) { SMILE_IDBG(3, "received 'pitchDirection' message"); sendPitchDirection(msg); return 1; // message was processed } else if (isMessageType(msg, "turnSpeakingStatus")) { SMILE_IDBG(3, "received 'turnSpeakingStatus' message: %i", msg->intData[0]); sendSpeakingStatus(msg, msg->intData[0]); return 1; // message was processed } return 0; // if message was not processed }
int cTumkwsjSink::processComponentMessage( cComponentMessage *_msg ) { if (isMessageType(_msg,"turnEnd")) { turnEnd=1; nPost = (long)(_msg->floatData[0]); vIdxEnd = (long)(_msg->floatData[1]); turnStartSmileTimeLast = turnStartSmileTime; return 1; } if (isMessageType(_msg,"turnStart")) { turnStart=1; nPre = (long)(_msg->floatData[0]); vIdxStart = (long)(_msg->floatData[1]); turnStartSmileTime = _msg->userTime1; return 1; } return 0; }
int cSemaineWordSender::processComponentMessage( cComponentMessage *_msg ) { if (isMessageType(_msg,"asrKeywordOutput")) { SMILE_IDBG(3,"received 'asrKeywordOutput' message"); sendKeywords(_msg); return 1; // message was processed } return 0; // if message was not processed }
int cSemaineEmotionSender::processComponentMessage( cComponentMessage *_msg ) { if (isMessageType(_msg,"classificationResult")) { // determine origin by message's user-defined name, which can be set in the config file SMILE_IDBG(3,"received 'classificationResult' message"); if (!strcmp(_msg->msgname,"arousal")) { // convert to EmotionML standard range: (SEMAINE uses -1 to +1, EmotionML 0 .. 1) _msg->floatData[0] = (_msg->floatData[0] + 1.0)/2.0; sendDimensionFSRE(_msg,EmotionML::VOC_FSRE_DIMENSION_AROUSAL); } else if (!strcmp(_msg->msgname,"valence")) { // convert to EmotionML standard range: (SEMAINE uses -1 to +1, EmotionML 0 .. 1) _msg->floatData[0] = (_msg->floatData[0] + 1.0)/2.0; sendDimensionFSRE(_msg,EmotionML::VOC_FSRE_DIMENSION_VALENCE); } else if (!strcmp(_msg->msgname,"interest")) sendInterestC(_msg); //else if (!strcmp(_msg->msgname,"gender")) sendGender(_msg); else if (!strcmp(_msg->msgname,"power")) { // convert to EmotionML standard range: (SEMAINE uses -1 to +1, EmotionML 0 .. 1) _msg->floatData[0] = (_msg->floatData[0] + 1.0)/2.0; sendDimensionFSRE(_msg,EmotionML::VOC_FSRE_DIMENSION_POTENCY); } else if (!strcmp(_msg->msgname,"intensity")) { // convert to EmotionML standard range: (SEMAINE uses -1 to +1, EmotionML 0 .. 1) _msg->floatData[0] = (_msg->floatData[0] + 1.0)/2.0; sendDimension(_msg,EmotionML::VOC_SEMAINE_INTENSITY_DIMENSION_INTENSITY, EmotionML::VOC_SEMAINE_INTENSITY_DIMENSION_DEFINITON); } else if (!strcmp(_msg->msgname,"anticipation")) { // invert values and map to EmotionML range: _msg->floatData[0] = (1.0 - _msg->floatData[0])/2.0; sendDimensionFSRE(_msg,EmotionML::VOC_FSRE_DIMENSION_UNPREDICTABILITY); } return 1; // message was processed } if (isMessageType(_msg,"classificationResults")) { sendDimensionsFSRE_I(_msg); //TODO: sendDimensions(_msg,EmotionML::VOC_SEMAINE_INTENSITY_DIMENSION_INTENSITY); } return 0; // if message was not processed }