/// <summary> /// 百度语音验证 /// </summary> public void baiduVideoVerify() { BaiDuAiFaceVideoVerifyRequest request = new BaiDuAiFaceVideoVerifyRequest(); request.session_id = "01562e5349b0a4044a23784dc707d46f"; try { FileUploadRequest fileUploadRequest = new FileUploadRequest("D://video//我的视频.mp4", "我的视频.mp4"); request.video_file = fileUploadRequest.fileData; //建议视频大小控制在10M/1min以内 BaiDuAiFaceVideoVerifyResponse response = client.Auth.baiduVideoVerify(request); Console.WriteLine("百度语音验证-响应数据:" + JSONUtil.getJsonStringFromObject(response)); } catch (SignApplicationException sae) { // 捕获网关校验数据 Console.WriteLine("百度语音验证-网关异常状态码为:" + sae.return_code); Console.WriteLine("百度语音验证-网关异常信息为:" + sae.return_message); } catch (SignServerException sse) { // 捕获网关校验数据 Console.WriteLine("百度语音验证-业务异常状态码为:" + sse.result_code); Console.WriteLine("百度语音验证-业务异常信息为:" + sse.result_message); } catch (Exception e) { Console.WriteLine("百度语音验证-异常为:" + e.Message); } }