我正在使用Microsoft Azure认知服务进行人脸识别项目。不太确定为什么我不能更正自己的JSON格式错误的语法,我以为6个月前就确定了这一点。我想创建一个组名,所以我调用“ Person Group API”,每次我遵循MS示例时,我的代码都会出错,但是在API测试控制台中,这没有问题,这是我从MS网站借来的代码示例:
{ "error": { "code": "ResourceNotFound", "message": "The requested resource was not found." } }
Run Code Online (Sandbox Code Playgroud)
以及在控制台模式下运行的代码:
static async void CreateGroup()
{
string key1 = "YourKey";
// azure the one should work
var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
// Request headers
client.DefaultRequestHeaders.Add
("Ocp-Apim-Subscription-Key", key1);
var uri = "https://westus.api.cognitive.microsoft.com/face/v1.0/
persongroups/{personGroupId}?" + queryString;
HttpResponseMessage response;
// Request body
string groupname = "myfriends";
string body = "{\"name\":\"" + groupname + ","+ "\"}";
// Request body
using (var …Run Code Online (Sandbox Code Playgroud) MS 最近推出了直接语音通道和一些 Web 前端使用它的示例。但我想知道它是否适合使用某些 SIP 或 twilio 电话之类的服务在呼叫中心场景中使用?如果是这样,我想查看一些文档如何使用直线语音 api 并将其连接到某些电话?我已经创建了 github 问题,但它仍然值得关注https://github.com/MicrosoftDocs/bot-docs/issues/1162
PS:我也有相关问题,我找不到任何关于如何将秘密交换为直线令牌的文档。原始直线的链接不适用于语音直线。谢谢
azure microsoft-cognitive botframework direct-line-botframework azure-cognitive-services
我正在尝试使用 Forms Recognizer 预览,经过多次反复试验,我终于通过 SAS URL 读取了文档。但是,即使使用快速入门 [1] 中提供的示例文档,我也会得到以下响应:
{
"modelId": "d7ba79e3-38bc-4913-bb11-82656cb08adc",
"trainingDocuments": [
{
"documentName": "Invoice_1.pdf",
"pages": 1,
"errors": [
"Page 1: Document is either invalid or exceeds the page/size limits."
],
"status": "failure"
},
{
"documentName": "Invoice_2.pdf",
"pages": 1,
"errors": [
"Page 1: Document is either invalid or exceeds the page/size limits."
],
"status": "failure"
},
{
"documentName": "Invoice_3.pdf",
"pages": 1,
"errors": [
"Page 1: Document is either invalid or exceeds the page/size limits."
],
"status": "failure"
}, …Run Code Online (Sandbox Code Playgroud) 我想找到一种方法在Face Api中减少api调用,我想知道,如果只能在一个Face Detect调用中提交多个图片?
例如,在同一个电话中发送了10张图片.
如果面部检测呼叫无法实现,这里有一种方法可以在同一个面部添加面部呼叫中添加多个面部吗?
非常感谢
拉斐!
使用扩展的元数据实体的查询不起作用。我是否需要使用除“属性”以外的其他URL参数传递这些参数
For example, the following query does not work (returns 400)
GET https://api.projectoxford.ai/academic/v1.0/evaluate?expr=Composite(J.JN=='computer')&model=latest&count=10&offset=0&attributes=Id,Ti,Y,D,CC,AuN,AA.AfN,J.JN,W,E,D,E,S.U HTTP/1.1
Host: api.projectoxford.ai
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••
Run Code Online (Sandbox Code Playgroud)
只需从实体列表中删除“ SU”即可使用
我正在关注此处的文档,底部的示例代码如下所示
<!DOCTYPE html>
<html>
<head>
<title>JSSample</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"> </script>
</head>
<body>
<script type="text/javascript">
$(function() {
var params = {
// Request parameters
"returnFaceId": "true",
"returnFaceLandmarks": "false",
"returnFaceAttributes": "{age}",
};
$.ajax({
url: "https://api.projectoxford.ai/face/v1.0/detect?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("Content-Type","application/json");
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","REDACTED");
},
type: "POST",
// Request body
data: "http://newsrescue.com/wp-content/uploads/2015/04/happy-person.jpg",
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
但我不断收到错误代码 404 资源未找到。谁能告诉我我做错了什么?
我一直在编写python代码,以传递包含图像的文件夹,以便使用Cognitive Vision API进行分析。当我将URL用作在线托管的任何图像时,我的代码可以正常工作。
但是,从本地计算机传递图像时遇到一些困难。我尝试使用以下方法将文件路径转换为URL:
imageurl = pathlib.Path(path).as_uri()
Run Code Online (Sandbox Code Playgroud)
有什么办法吗?我有大约2000张图片要分析。
这篇文章上传图像到Microsoft Cognitive Services?提供了一些有关如何使用C#进行操作的见解,但我没有找到任何类似的python文档。
提前致谢。
我想使用REST API对我的自定义视觉项目进行培训,预测等.我没有看到任何使用JSON明确提到GET,POST方法的地方.有参考文献吗?
我使用这个 HTTP-Get 请求来获取翻译的不记名令牌:
https://api.cognitive.microsoft.com/sts/v1.0/issueToken?Subscription-Key=1fo8xxx
Run Code Online (Sandbox Code Playgroud)
使用返回的 Bearer 我想使用这个 API 端点翻译一个短文本:
https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=de
Run Code Online (Sandbox Code Playgroud)
在标题中,我把这个:
Content-Type: application/json; charset=UTF-8.
Run Code Online (Sandbox Code Playgroud)
在正文中,我把这个:
[
{"Text":"I would really like to drive your car around the block a few times."}
]
Run Code Online (Sandbox Code Playgroud)
我正在使用 Postman,所以在授权选项卡中我选择了 Bearer 并在它旁边的字段中插入:
Bearer <result from the first API call>
Run Code Online (Sandbox Code Playgroud)
如果我发送请求,我会得到以下结果:
{"error":{"code":401000,"message":"The request is not authorized because credentials are missing or invalid."}}
Run Code Online (Sandbox Code Playgroud) 我从github下载了bot应用程序示例,并通过visualstudio打开了luis应用程序,并尝试导入json文件在luis.ai门户中创建一个新的应用程序,但它抛出了错误
"BadArgument:版本ID不能为null或为空."
artificial-intelligence microsoft-cognitive botframework azure-language-understanding
Microsoft Academic API 的请求速率限制是多少?我似乎无法在任何地方找到它的记录。