音声認識コマンド送信メッセージ受信時に発生する。
Event information
- C#: delegate void delegateNotifySendSpeechRecognitionCommand(SpeechRecognitionCommandInfo cmdInfo);
event delegateNotifySendSpeechRecognitionCommand evNotifySendSpeechRecognitionCommand;
- Ruby: EvNotifySendSpeechRecognitionCommand(cmdInfo)
- Python: evNotifySendSpeechRecognitionCommand(cmdInfo)
Arguments
- cmdInfo: SpeechRecognitionCommandInfoクラス
Remarks
対応バージョン: SDK 2.0.0, Haruzira 2.0.0以降
Examples
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
ClientTcpCommunication cltComm = new ClientTcpCommunication(); cltComm.evNotifySendSpeechRecognitionCommand += new delegateNotifySendSpeechRecognitionCommand(rcvSendSpeechRecognitionCommand); //callback function private void rcvSendSpeechRecognitionCommand(SpeechRecognitionCommandInfo cmdInfo) { Dispatcher.BeginInvoke(new Action(() => { //txtNotify is a TextBox control. txtNotify.Text += string.Format("ip[{0}], port[{1}], command[{2}], time stamp[{3}]", cmdInfo.IpAddr, cmdInfo.Port, cmdInfo.Command, cmdInfo.Timestamp) + "\r\n"; }), DispatcherPriority.Send); } |
Ruby
1 2 3 4 5 6 7 8 |
//callback function rcvSendSpeechRecognitionCommand = lambda{|cmdInfo| puts("Ip[%s], Port[%d], Command[%s], Timestamp[%s]" % [cmdInfo.IpAddr, cmdInfo.Port, cmdInfo.Command, cmdInfo.Timestamp]) } cltComm = ClientTcpCommunication.new cltComm .EvNotifySendSpeechRecognitionCommand = rcvSendSpeechRecognitionCommand |
Python
1 2 3 4 5 6 7 |
//callback function def rcv_send_speech_recognition_command(cmdInfo) print("Ip[{0:s}], Port[{1:d}], Command[{2:s}], Timestamp[{3:s}]".format(cmdInfo.ip_addr, cmdInfo.port, cmdInfo.command, cmdInfo.timestamp)) clt_comm = hz_client_tcp_communication.ClientTcpCommunication() clt_comm.evNotifySendSpeechRecognitionCommand = rcv_send_speech_recognition_command |