当前位置:   article > 正文

【微软 Azure 认知服务】零基础搭建微软 Azure AI 认知服务实验分享_azure ai 如何试用

azure ai 如何试用

Azure人工智能认知服务实验

Azure认知服务(语音合成产品系列)是微软云服务里面的明星产品,基于行业领先的Hifi-net语音模型打造,可以提供高质量神经网络版声音,发音更准确、韵律更自然、高保真并支持多种风格情感自然切换,该项产品已落地在各大媒体、短视频平台,以及智能汽车、智能手机与设备等诸多领域。
认知服务让每个开发人员都能使用 AI,而无需机器学习专业知识。只需 API 调用,即可将查看、收听、朗读、搜索、理解和加速决策的功能嵌入到应用中。

文章目录

一、计算机视觉

参考链接:什么是计算机视觉?

Ⅰ、图像分析

参考链接:什么是图像分析?

计算机视觉图像分析服务可以从图像中提取各种视觉特征。 例如,该服务可以确定图像是否包含成人内容、查找特定的品牌或对象,或查找人脸。

实验操作步骤

1、在Azure上创建Computer Vison API。点击“认知服务”进行创建。

image-20211022231434860

2、找到“计算机视觉”,点击“创建”。

image-20211022231750034

3、若事前未新建资源组。在这里点击“新建”。

image-20211022231915311

4、输入要创建新的资源组的名称。

image-20211022232024252

5、选择实例所在的区域,以及要创建的名称。

image-20211022232323718

6、下拉到底部,勾选许可条框。

image-20211022232430948

7、配置虚拟网络信息。根据需要自行更改设置。

image-20211022232713882

8、点击“查看+创建”。

image-20211022232802147

9、验证通过,点击“创建”。

image-20211022232833741

10、等待部署完成。

image-20211022232916897

11、部署完成。点击“转到资源”。

image-20211022232955057
image-20211022233019267

12、查看相关信息。

image-20211022233147515

13、点击“单击此处管理密钥”。

image-20211022233303145

14、打开API参考链接。

image-20211022233850536

15、选择“打开API测试控制台”。

image-20211022233937710

16、使用示例测试展现效果。

本文演示如何调用图像分析 API 以返回有关图像的视觉特征的信息。
image-20211023011217210
image-20211023011357724
使用的示例图片
image-20211023011617151

(1)特征选择:Categories(类别)
csp-billing-usage: CognitiveServices.ComputerVision.Categories=1,CognitiveServices.ComputerVision.Landmarks=1,CognitiveServices.ComputerVision.Transaction=1
x-envoy-upstream-service-time: 16354
apim-request-id: 6b83e60b-81aa-4fd7-abd4-bef0892f389d
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Fri, 22 Oct 2021 16:31:12 GMT
Content-Length: 260
Content-Type: application/json; charset=utf-8

{
  "categories": [{
    "name": "building_street",
    "score": 0.40234375,
    "detail": {
      "landmarks": []
    }
  }, {
    "name": "outdoor_",
    "score": 0.00390625,
    "detail": {
      "landmarks": []
    }
  }],
  "requestId": "6b83e60b-81aa-4fd7-abd4-bef0892f389d",
  "metadata": {
    "height": 4224,
    "width": 5632,
    "format": "Jpeg"
  }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

image-20211023003300650

(2)特征选择:Description(描述)
csp-billing-usage: CognitiveServices.ComputerVision.Description=1,CognitiveServices.ComputerVision.Landmarks=1,CognitiveServices.ComputerVision.Transaction=1
x-envoy-upstream-service-time: 12654
apim-request-id: b4c07513-3b10-40b9-858b-d5dc525d5d0b
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Fri, 22 Oct 2021 16:35:57 GMT
Content-Length: 591
Content-Type: application/json; charset=utf-8

{
  "categories": [{
    "name": "建筑_街道",
    "score": 0.40234375,
    "detail": {
      "landmarks": []
    }
  }, {
    "name": "户外_",
    "score": 0.00390625,
    "detail": {
      "landmarks": []
    }
  }],
  "description": {
    "tags": ["户外", "草", "城市", "大", "体育", "田地", "男人", "站", "球", "绿色", "播放器", "橙子", "公园", "阴天", "空气", "飞行", "轨道", "骑", "飞机", "水", "火车", "街道", "人们", "播放", "院子", "风筝", "蓝色", "巴士"],
    "captions": [{
      "text": "城市的风景",
      "confidence": 0.6212207909539402
    }]
  },
  "requestId": "b4c07513-3b10-40b9-858b-d5dc525d5d0b",
  "metadata": {
    "height": 4224,
    "width": 5632,
    "format": "Jpeg"
  }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37

image-20211023003748781

(3)特征选择:Tags(标签)
csp-billing-usage: CognitiveServices.ComputerVision.Landmarks=1,CognitiveServices.ComputerVision.Tags=1,CognitiveServices.ComputerVision.Transaction=1
x-envoy-upstream-service-time: 8701
apim-request-id: 3e22d834-63f6-4a6f-9faa-550d6c5e8b69
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Fri, 22 Oct 2021 16:44:33 GMT
Content-Length: 825
Content-Type: application/json; charset=utf-8

{
  "categories": [{
    "name": "建筑_街道",
    "score": 0.40234375,
    "detail": {
      "landmarks": []
    }
  }, {
    "name": "户外_",
    "score": 0.00390625,
    "detail": {
      "landmarks": []
    }
  }],
  "tags": [{
    "name": "天空",
    "confidence": 0.9999513626098633
  }, {
    "name": "户外",
    "confidence": 0.9900293350219727
  }, {
    "name": "草",
    "confidence": 0.9896734952926636
  }, {
    "name": "云",
    "confidence": 0.9334161281585693
  }, {
    "name": "摩天楼",
    "confidence": 0.8285492658615112
  }, {
    "name": "建筑",
    "confidence": 0.8191744089126587
  }, {
    "name": "运动场/游乐场",
    "confidence": 0.7252355217933655
  }, {
    "name": "运动",
    "confidence": 0.6510032415390015
  }, {
    "name": "树",
    "confidence": 0.5010823011398315
  }, {
    "name": "体育场",
    "confidence": 0.20338237285614014
  }, {
    "name": "天",
    "confidence": 0.11071398854255676
  }],
  "requestId": "3e22d834-63f6-4a6f-9faa-550d6c5e8b69",
  "metadata": {
    "height": 4224,
    "width": 5632,
    "format": "Jpeg"
  }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64

image-20211023005028397

(4)特征选择:Color(颜色)
csp-billing-usage: CognitiveServices.ComputerVision.Color=1,CognitiveServices.ComputerVision.Landmarks=1,CognitiveServices.ComputerVision.Transaction=1
x-envoy-upstream-service-time: 3890
apim-request-id: 8e5edb4f-fa4e-4dba-a12e-990a8b903f0c
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Fri, 22 Oct 2021 16:54:09 GMT
Content-Length: 420
Content-Type: application/json; charset=utf-8

{
  "categories": [{
    "name": "building_street",
    "score": 0.40234375,
    "detail": {
      "landmarks": []
    }
  }, {
    "name": "outdoor_",
    "score": 0.00390625,
    "detail": {
      "landmarks": []
    }
  }],
  "color": {
    "dominantColorForeground": "Brown",
    "dominantColorBackground": "White",
    "dominantColors": ["White"],
    "accentColor": "753830",
    "isBwImg": false,
    "isBWImg": false
  },
  "requestId": "8e5edb4f-fa4e-4dba-a12e-990a8b903f0c",
  "metadata": {
    "height": 4224,
    "width": 5632,
    "format": "Jpeg"
  }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38

image-20211023005628672
通过上述测试,图像中的基本事物情况已被分析出来。

17、使用Postman调用HTTP请求

Request URL

https://picture-analysis.cognitiveservices.azure.cn/vision/v1.0/analyze?visualFeatures=Description&details=Landmarks&language=en
  • 1

HTTP request

POST https://picture-analysis.cognitiveservices.azure.cn/vision/v1.0/analyze?visualFeatures=Color&details=Landmarks&language=en HTTP/1.1
Host: picture-analysis.cognitiveservices.azure.cn
Content-Type: application/json
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••

{"url":"https://i.loli.net/2021/10/23/qwEFXz163lh9duN.jpg"}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

image-20211023014822168
image-20211023014853469
image-20211023014914717

{
    "categories": [
        {
            "name": "建筑_街道",
            "score": 0.40234375,
            "detail": {
                "landmarks": []
            }
        },
        {
            "name": "户外_",
            "score": 0.00390625,
            "detail": {
                "landmarks": []
            }
        }
    ],
    "tags": [
        {
            "name": "天空",
            "confidence": 0.9999513626098633
        },
        {
            "name": "户外",
            "confidence": 0.9900293350219727
        },
        {
            "name": "草",
            "confidence": 0.9896734952926636
        },
        {
            "name": "云",
            "confidence": 0.9334161281585693
        },
        {
            "name": "摩天楼",
            "confidence": 0.8285492658615112
        },
        {
            "name": "建筑",
            "confidence": 0.8191744089126587
        },
        {
            "name": "运动场/游乐场",
            "confidence": 0.7252355217933655
        },
        {
            "name": "运动",
            "confidence": 0.6510032415390015
        },
        {
            "name": "树",
            "confidence": 0.5010823011398315
        },
        {
            "name": "体育场",
            "confidence": 0.20338237285614014
        },
        {
            "name": "天",
            "confidence": 0.11071398854255676
        }
    ],
    "description": {
        "tags": [
            "户外",
            "草",
            "城市",
            "大",
            "体育",
            "田地",
            "男人",
            "站",
            "球",
            "绿色",
            "播放器",
            "橙子",
            "公园",
            "阴天",
            "空气",
            "飞行",
            "轨道",
            "骑",
            "飞机",
            "水",
            "火车",
            "街道",
            "人们",
            "播放",
            "院子",
            "风筝",
            "蓝色",
            "巴士"
        ],
        "captions": [
            {
                "text": "城市的风景",
                "confidence": 0.6212207840873964
            }
        ]
    },
    "requestId": "d622f155-d1ff-48b0-8c83-d99efc3d737a",
    "metadata": {
        "height": 4224,
        "width": 5632,
        "format": "Jpeg"
    }
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108

Ⅱ 人脸API

检测和识别图像中的人和情感。

什么是 Azure 人脸服务?

将面部识别嵌入应用中,以实现高度安全的无缝用户体验。不需要掌握机器学习专业知识。功能包括: 人脸检测,可感知图像中的人脸和特性; 人员识别,可以与最多包含 1,000,000 人的专用存储库中的个人进行匹配; 情感识别,可感知各种反应(如快乐、蔑视、中立和恐惧等); 以及对图像中的相似人脸进行识别和分组

参考链接:快速入门:使用人脸客户端库

1、创建人脸API。

image-20211105120916778

2、填写基本信息。

image-20211105121318898

3、点击“查看+创建”。

image-20211105121408335

4、验证已通过,点击“创建”。

image-20211105121444971

5、部署完成。点击“转到资源”。

image-20211105121633670

6、查看face-api服务概述。

image-20211105121753976

7、检测和分析人脸。

在线测试链接:[Face API - v1.0](Microsoft Cognitive Services (azure.cn))
image-20211105161453741
image-20211105163024995

[
    {
        "faceId": "e3aeb060-a895-4687-ace2-117223e4c045",
        "faceRectangle": {
            "top": 62,
            "left": 63,
            "width": 57,
            "height": 76
        }
    }
]
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
8、获取人脸特性。

若要提取人脸属性,请再次调用检测 API,但将 detectionModel 设置为 detection_01。 同时,添加 returnFaceAttributes 查询参数。 该命令现在应如下所示。 与之前一样,请插入你的人脸订阅密钥和终结点。

image-20211105165640103

[
    {
        "faceId": "3307d715-c326-4c11-98a4-f46ce9ab9ad3",
        "faceRectangle": {
            "top": 78,
            "left": 57,
            "width": 55,
            "height": 55
        },
        "faceAttributes": {
            "smile": 0.751,
            "headPose": {
                "pitch": 7.1,
                "roll": 7.2,
                "yaw": -18.3
            },
            "gender": "female",
            "age": 22.0,
            "facialHair": {
                "moustache": 0.0,
                "beard": 0.0,
                "sideburns": 0.0
            },
            "glasses": "NoGlasses",
            "emotion": {
                "anger": 0.0,
                "contempt": 0.001,
                "disgust": 0.002,
                "fear": 0.002,
                "happiness": 0.751,
                "neutral": 0.022,
                "sadness": 0.22,
                "surprise": 0.001
            },
            "blur": {
                "blurLevel": "high",
                "value": 1.0
            },
            "exposure": {
                "exposureLevel": "overExposure",
                "value": 1.0
            },
            "noise": {
                "noiseLevel": "low",
                "value": 0.0
            },
            "makeup": {
                "eyeMakeup": true,
                "lipMakeup": true
            },
            "accessories": [],
            "occlusion": {
                "foreheadOccluded": false,
                "eyeOccluded": false,
                "mouthOccluded": false
            },
            "hair": {
                "bald": 0.05,
                "invisible": false,
                "hairColor": [
                    {
                        "color": "black",
                        "confidence": 1.0
                    },
                    {
                        "color": "brown",
                        "confidence": 0.79
                    },
                    {
                        "color": "other",
                        "confidence": 0.47
                    },
                    {
                        "color": "gray",
                        "confidence": 0.17
                    },
                    {
                        "color": "blond",
                        "confidence": 0.07
                    },
                    {
                        "color": "red",
                        "confidence": 0.05
                    },
                    {
                        "color": "white",
                        "confidence": 0.0
                    }
                ]
            }
        }
    }
]
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93

二、认知搜索

参考链接:Azure认知搜索是什么?

Azure 认知搜索(以前称为“Azure 搜索”)是一个云搜索服务,它为开发人员提供基础结构、API 和工具,用于基于 Web、移动和企业应用程序中的专用异类内容构建丰富的搜索体验。

搜索是任何向用户展示文本内容的应用的基础,其常见方案包括目录或文档搜索、在线零售或数据科学知识挖掘等。
在这里插入图片描述

Ⅰ、在 Azure 门户中创建 Azure 认知搜索索引

前提条件:

  • 具有活动订阅的 Azure 帐户。
  • Azure 认知搜索服务(任意层,任意区域)。可以使用本快速入门的免费服务。
1、创建认知搜索服务。

image-20211024081631080

2、点击“更改定价层”,选择免费层。

image-20211024081804038

3、点击“查看+创建”。

image-20211024081900822

4、部署完成。转到资源。

image-20211024081956909
image-20211024082041898

Ⅱ、创建索引并加载数据
1、启动“导入数据”向导和创建数据源。

这里选择导入数据源的类型为“示例”。
image-20211024082401776
image-20211024082516383
image-20211024082607563

2、选择“跳到:自定义目标索引”。

image-20211024082742534

3、配置索引。

对于内置的酒店示例索引,系统会为你定义一个默认的索引架构。 除了一些高级筛选器示例之外,针对酒店示例索引的文档和示例中的查询将会根据此索引定义运行:

image-20211024082916490
image-20211024083051305
保持默认,继续下一页操作。

4、配置索引器。

image-20211024083154380
查看索引器。
image-20211024083316252
查看索引。
image-20211024083434961
查看数据源。
image-20211024083407891
image-20211024083555387

5、使用搜索浏览器查询。

参考链接:使用搜索浏览器查询
image-20211024083723782

在“索引”下拉列表中,选择“hotels-sample-index”。 单击“API 版本”下拉列表,查看有哪些 REST API 可用。 对于以下查询,请使用正式发行版 (2020-06-30)。

在搜索栏中粘贴以下查询字符串,并单击“搜索”。

search=beach&$filter=Rating gt 4&$count=true
  • 1

image-20211024084211535

  • 自由文本搜索
Seattle apartment "Lake Washington" miele OR thermador appliance
  • 1

image-20211024085851699

  • 匹配文档字数
    image-20211024090212434
6、查询示例。

参考链接:查询示例

  • 提供 top N 结果的简单查询

    • 字符串查询

    search=spa
    image-20211024090424311

  • 筛选查询

    • search=beach&$filter=Rating gt 4
      image-20211024090627847
  • 分面查询

  • 突出显示搜索结果

  • 试用模糊查询

  • 查实地理空间搜索

三、语音服务

参考官方链接:什么是语音服务?

语音服务在单个 Azure 订阅中统合了语音转文本、文本转语音以及语音翻译功能。 使用语音 CLI语音 SDK语音设备 SDKSpeech StudioREST API 可以轻松在应用程序、工具和设备中启用语音。

Ⅰ、创建语音服务

1、创建语音服务

image-20211024091609180
image-20211024091603634

2、部署完成。

image-20211024091736793
image-20211024091835877
image-20211024091921360

3、查看密钥以及终结点。

image-20211024192216935

Ⅱ、语音转文本——REST API

参考链接:语音转文本 REST API

语音转文本有两个不同的 REST API。 每个 API 都有其特殊用途,并使用不同的终结点集。

1、构建http请求的注意事项:
  • 音频格式

在 HTTP POST请求的正文中发送音频。 它必须采用下表中的格式之一:

格式编解码器比特率采样率
WAVPCM256 kbps16 kHz,单声道
OGGOPUS256 kpbs16 kHz,单声道
  • 请求标头

该表列出了语音转文本请求的必需和可选标头。

标头说明必需/可选
Ocp-Apim-Subscription-Key语音服务订阅密钥。此标头或 Authorization 是必需的。
Authorization前面带有单词Bearer`的授权令牌。此标头或 Ocp-Apim-Subscription-Key是必需的。
Pronunciation-Assessment指定用于在识别结果中显示发音分数的参数,这些参数评估语音输入的发音质量,并具有准确性、流畅性、完整性等指标。此参数是 Base64 编码的 json,其中包含多个详细的参数。可选
Content-type描述所提供音频数据的格式和编解码器。 接受的值为 audio/wav; codecs=audio/pcm; samplerate=16000 和 audio/ogg; codecs=opus。必需
Transfer-Encoding指定要发送分块的音频数据,而不是单个文件。 仅当要对音频数据进行分块时才使用此标头。可选
Expect如果使用分块传输,则发送 Expect: 100-continue。 语音服务将确认初始请求并等待附加的数据。如果发送分块的音频数据,则是必需的。
Accept如果提供此标头,则值必须是 application/json。 语音服务以 JSON 格式提供结果。 某些请求框架提供不兼容的默认值。 最好始终包含 Accept。可选,但建议提供。
2、获取访问令牌——postman

使用Postman获取Token 参考如下:

若要获取访问令牌,需使用 Ocp-Apim-Subscription-Key 和订阅密钥向 issueToken 终结点发出请求。

issueToken 终结点具有以下格式:

https://<REGION_IDENTIFIER>.api.cognitive.azure.cn/sts/v1.0/issueToken
  • 1

将 <REGION_IDENTIFIER>替换为与下表中的订阅区域匹配的标识符:

地理位置区域区域标识符
中国中国东部 2chinaeast2
中国中国北部 2chinanorth2

image-20211024214920960

3、post请求https如下。具体参数说明如下。
https://chinaeast2.stt.speech.azure.cn/speech/recognition/conversation/cognitiveservices/v1?initialSilenceTimeoutMs=15000&language=zh-CN
  • 1

适用于短音频的 REST API 的终结点具有以下格式:

https://<REGION_IDENTIFIER>.stt.speech.azure.cn/speech/recognition/conversation/cognitiveservices/v1
  • 1

将 <REGION_IDENTIFIER>替换为与下表中的订阅区域匹配的标识符:

地理位置区域区域标识符
中国中国东部 2chinaeast2
中国中国北部 2chinanorth2
  • InitialSilenceTimeout——音频流的开始仅包含静音,并且服务在等待语音时超时。(此标头或 Authorization 是必需的)

  • language——标识所要识别的口语。(必需)

4、查询参数以及请求标头内容如下。

image-20211024212302320

5、请求标头设置如下。

image-20211024212619447

6、上传音频并成功地将语音内容转化成文本内容。如图所示。

image-20211024213002006

Ⅲ、以SDK的方式将语音文件转换成文本(Python示例)

参考链接:语音转文本入门

四、自定义视觉

参考官方链接:什么是自定义视觉?

Azure 自定义视觉是一种图像识别服务,可用于构建、部署和改进你自己的图像标识符模型。 图像标识符根据其检测到的视觉特征将标签(表示分类或对象)应用于图像。 与计算机视觉服务不同,自定义视觉允许你指定自己的标签并训练自定义模型以对其进行检测。

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号