Ejemplo n.º 1
0
        public override async System.Threading.Tasks.Task <CallServiceResponse <IGenericServiceResponse> > CallServiceAsync(byte[] audioBytes, System.Collections.Generic.Dictionary <string, string> apiArgs)
        {
            Log.WriteLine("HoundifySpeechToTextServices: audioBytes.Length:" + audioBytes.Length);
            //IntentServiceResponse response = new IntentServiceResponse(service);
            CallServiceResponse <IGenericServiceResponse> response = new CallServiceResponse <IGenericServiceResponse>(service);

            response.Request = Array.Find(service.requests, p => p.argType == "binary");
            await HoundifyServices.HoundifyPostAsync(service, response, HttpMethods.MakeUri(service.requests[0], apiArgs, null, ""), audioBytes, apiArgs);

            return(response);
        }
Ejemplo n.º 2
0
        public override async System.Threading.Tasks.Task <CallServiceResponse <IGenericServiceResponse> > CallServiceAsync(string text, System.Collections.Generic.Dictionary <string, string> apiArgs)
        {
            Log.WriteLine("HoundifyIntentServices: text:" + text);
            //IntentServiceResponse response = new IntentServiceResponse(service);
            CallServiceResponse <IGenericServiceResponse> response = new CallServiceResponse <IGenericServiceResponse>(service);

            response.Request = Array.Find(service.requests, p => p.argType == "text");
            await HoundifyServices.HoundifyPostAsync(service, response, HttpMethods.MakeUri(service.requests[0], apiArgs, null, text), new byte[0], apiArgs);

            return(response);
        }