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();
        }