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
        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 = IdentifyProtocolV1.recognize("ap-southeast-1.api.acrcloud.com", "xxxxxxxx", "xxxxxxxx", datas, "audio");
                    Console.WriteLine(result);
                }
            }

            Console.ReadLine();
        }
Esempio 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 = IdentifyProtocolV1.recognize("##YOUR_HOST###", "###YOUR_ACCESS_KEY###", "###YOUR_ACCESS_SECRET###", datas, "audio");
                    Console.WriteLine(result);
                }
            }

            Console.ReadLine();
        }