recognize() public static method

public static recognize ( string host, string accessKey, string secretKey, byte queryData, string queryType, int timeout = 8000 ) : string
host string
accessKey string
secretKey string
queryData byte
queryType string
timeout int
return string
Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            using (FileStream fs = new FileStream(@"E:\sample.wav", FileMode.Open))
            {
                using (BinaryReader reader = new BinaryReader(fs))
                {
                    byte[] datas = reader.ReadBytes((int)fs.Length);
                    // Replace "xxxxxxxx" below with your project's access_key and access_secret.
                    string result = IdentifyProtocolV2.recognize("ap-southeast-1.api.acrcloud.com", "xxxxxxxx", "xxxxxxxx", datas, "audio");
                    Console.WriteLine(result);
                }
            }

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            using (FileStream fs = new FileStream(@"E:\sample.wav", FileMode.Open))
            {
                using (BinaryReader reader = new BinaryReader(fs))
                {
                    byte[] datas = reader.ReadBytes((int)fs.Length);
                    // Replace "###...###" below with your project's host, access_key and access_secret.
                    string result = IdentifyProtocolV2.recognize("###YOUR_HOST", "###YOU_ACCESS_KEY###", "###YOUR_ACCESS_SECRET###", datas, "audio");
                    Console.WriteLine(result);
                }
            }

            Console.ReadLine();
        }