示例#1
0
        static void Main(string[] args)
        {
            var client = new AsrClient("127.0.0.1:8050", "1906");

            client.LogLevel = 0;
            Console.WriteLine("Create client");
            AsrClientDemo demo = new AsrClientDemo();

            var stream0 = client.NewStream(new StreamToken("fakeuser", new DateTime(2019, 4, 25, 12, 41, 16), "fakepassword"));
            var task0   = demo.FileAsrAsync(stream0, "C:\\Users\\temp.wav", client.RecommendPacketSize);

            var stream1 = client.NewStream(new StreamToken("fakeuser", new DateTime(2021, 1, 1), "fakepassword"));
            var task1   = demo.FileAsrAsync(stream1, "C:\\Users\\zhiyu2.wav", client.RecommendPacketSize);

            task0.Wait();
            task1.Wait();
            Console.ReadLine();
        }
示例#2
0
        static void Main(string[] args)
        {
            var client = new AsrClient("asr.baiduai.cloud:8051", "1906");

            client.LogLevel = 0;
            Console.WriteLine("Create client");
            AsrClientDemo demo = new AsrClientDemo();

            var stream0 = client.NewStream(new StreamToken("fake_user", new DateTime(2021, 4, 25, 12, 41, 16), "fake_password"));
            var task0   = demo.FileAsrAsync(stream0, "C:\\GitHub\\pie\\zhiyu1.wav", client.RecommendPacketSize);

            var stream1 = client.NewStream(new StreamToken("fake_user", new DateTime(2021, 1, 1), "fake_password"));
            var task1   = demo.FileAsrAsync(stream1, "C:\\GitHub\\pie\\zhiyu2.wav", client.RecommendPacketSize);

            task0.Wait();
            task1.Wait();
            Console.ReadLine();
        }