// MRCP connection established, start communication public override bool OnAdd(UniMRCPSigStatusCode status) { if (status != UniMRCPSigStatusCode.SUCCESS) { return(Fail(String.Format("Failed to add channel: {0}", status))); } // Start processing here UniMRCPSynthesizerMessage msg = CreateMessage(UniMRCPSynthesizerMethod.SYNTHESIZER_SPEAK); msg.content_type = "text/plain"; msg.SetBody(text); return(msg.Send()); }
// MRCP connection established, start communication public override bool OnAdd(UniMRCPSigStatusCode status) { if (status != UniMRCPSigStatusCode.SUCCESS) { return(Fail(String.Format("Failed to add channel: {0}", status))); } // Load grammar content from file byte[] content = File.ReadAllBytes(grammarFile); // Start processing here UniMRCPRecognizerMessage msg = CreateMessage(UniMRCPRecognizerMethod.RECOGNIZER_RECOGNIZE); msg.content_type = "application/grammar+xml"; msg.SetBody(content); return(msg.Send()); }
public override bool OnTerminate(UniMRCPSigStatusCode status) { Console.WriteLine("Session terminated with code {0}", status); return(true); }
public override bool OnTerminate(UniMRCPSigStatusCode status) { Console.WriteLine("Session terminated with code {0}", status); return true; }
// MRCP connection established, start communication public override bool OnAdd(UniMRCPSigStatusCode status) { if (status != UniMRCPSigStatusCode.SUCCESS) return Fail(String.Format("Failed to add channel: {0}", status)); // Start processing here UniMRCPSynthesizerMessage msg = CreateMessage(UniMRCPSynthesizerMethod.SYNTHESIZER_SPEAK); msg.content_type = "text/plain"; msg.SetBody(text); return msg.Send(); }
// MRCP connection established, start communication public override bool OnAdd(UniMRCPSigStatusCode status) { if (status != UniMRCPSigStatusCode.SUCCESS) return Fail(String.Format("Failed to add channel: {0}", status)); // Load grammar content from file byte[] content = File.ReadAllBytes(grammarFile); // Start processing here UniMRCPRecognizerMessage msg = CreateMessage(UniMRCPRecognizerMethod.RECOGNIZER_RECOGNIZE); msg.content_type = "application/grammar+xml"; msg.SetBody(content); return msg.Send(); }