多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## 语音识别结果说明 |JSON字段 |英文全称 |类型 | 说明 | | :---: | :---: | :---: | :---: | |sn |sentence |int | 第几句 | |ls | last sentence |boolean | 是否最后一句 | | bg |begin |int | 开始 | | ed | end | int | 结束 | | ws |words | array | 词 | | cw | chinese word | array |中文分词 | | w | word | string |单字 | | sc | score |int |分数 | 语音听写结果示例: ~~~ { "sn": 1, "ls": true, "bg": 0, "ed": 0, "ws": [ { "bg": 0, "cw": [ { "w": " 今天 ", "sc": 0 } ] }, { "bg": 0, "cw": [ { "w": " 的", "sc": 0 } ] }, { "bg": 0, "cw": [ { "w": " 天气 ", "sc": 0 } ] }, { "bg": 0, "cw": [ { "w": " 怎么样 ", "sc": 0 } ] }, { "bg": 0, "cw": [ { "w": " 。", "sc": 0 } ] } ] } ~~~ 多候选结果示例: ~~~ { "sn": 1, "ls": false, "bg": 0, "ed": 0, "ws": [ { "bg": 0, "cw": [ { "w": "我想听", "sc": 0 } ] }, { "bg": 0, "cw": [ { "w": "拉德斯基进行曲", "sc": 0 }, { "w": "拉得斯进行曲", "sc": 0 } ] } ] } ~~~ 语法识别结果示例: ~~~ { "sn": 1, "ls": true, "bg": 0, "ed": 0, "ws": [ { "bg": 0, "cw": [ { "sc": "70", "gm": "0", "w": "北京到上海" }, { "sc": "69", "gm": "0", "w": "天京到上海" }, { "sc": "58", "gm": "0", "w": "东京到上海" } ] } ] } ~~~ ## 声纹业务 文本密码JSON示例: ~~~ { "txt_pwd": [ "我的地盘我做主", "移动改变生活", "芝麻开门" ] } ~~~ 数字密码JSON示例: ~~~ { "num_pwd": [ "03285469", "09734658", "53894276", "57392804", "68294073" ] } ~~~ 声纹业务结果(VerifierResult)成员说明: | 成员 |说明 | | :---: | --- | | sst |业务类型,取值为train或verify | | ret |返回值,0为成功,-1为失败 | | vid |注册成功的声纹模型id | | score | 当前声纹相似度 | |suc | 本次注册已成功的训练次数 | |rgn |本次注册需要的训练次数 | | trs | 注册完成描述信息 | |err |注册/验证返回的错误码 | | dcs | 描述信息 | ## 人脸识别结果说明 |JSON字段 |类型 | 说明 | | :---: | :---: | --- | |sst| string |指定本路会话是属于何种性质| |rst |bool| 结果| |sid |string| 会话id| |ret |int |错误码| |uid |string |用户id| |score| float| 打分| |pose |dictionary |面部朝向| |confidence |float| 置信度| |position| dictionary |面部的矩形区域| |landmark| dictionary| 关键点数组| 人脸检测时响应结果返回json格式串: ~~~ { "face": [ { "attribute": { "pose": { "pitch": 1 } }, "confidence": "10.412", "position": { "bottom": 447, "left": 140, "right": 419, "top": 168 }, "tag": "" } ], "ret": "0", "rst": "success", "sid": "wfr278422e9@ch47fc0817c22e477000", "sst": "detect", "uid": "a1644276827" } ~~~ 关键点检测时响应结果返回json格式串: ~~~ { "result": [ { "landmark": { "left_eye_center": { "x": "209.739", "y": "229.428" }, "left_eye_left_corner": { "x": "177.219", "y": "230.914" }, "left_eye_right_corner": { "x": "235.839", "y": "236.793" }, "left_eyebrow_left_corner": { "x": "155.253", "y": "187.392" }, "left_eyebrow_middle": { "x": "199.240", "y": "182.701" }, "left_eyebrow_right_corner": { "x": "246.582", "y": "192.358" }, "mouth_left_corner": { "x": "204.203", "y": "386.777" }, "mouth_lower_lip_bottom": { "x": "262.768", "y": "416.832" }, "mouth_middle": { "x": "263.705", "y": "390.507" }, "mouth_right_corner": { "x": "317.841", "y": "390.864" }, "mouth_upper_lip_top": { "x": "264.736", "y": "367.996" }, "nose_bottom": { "x": "267.811", "y": "339.358" }, "nose_left": { "x": "225.449", "y": "319.586" }, "nose_right": { "x": "308.086", "y": "323.936" }, "nose_top": { "x": "271.755", "y": "310.934" }, "right_eye_center": { "x": "335.608", "y": "234.335" }, "right_eye_left_corner": { "x": "306.995", "y": "238.703" }, "right_eye_right_corner": { "x": "364.231", "y": "240.307" }, "right_eyebrow_left_corner": { "x": "300.652", "y": "194.243" }, "right_eyebrow_middle": { "x": "347.711", "y": "188.787" }, "right_eyebrow_right_corner": { "x": "391.572", "y": "197.455" } } } ], "ret": "0", "rst": "success", "sid": "wfr278522e9@ch47fc0817c255477600", "sst": "align", "uid": "a1644276827" } ~~~ ## 身份验证结果说明 ### 人脸注册字段 |JSON字段| 类型| 说明| | :---: | :---: | --- | |ssub| String| 业务类型,人脸业务为ifr(人脸验证)| |sst |String |子业务类型,注册业务为enroll| |ret |int |返回值,0为请求成功,其他为请求失败| |suc |int| 本次注册已成功的训练次数| |rgn |int| 本次注册需要的训练次数| |fid |String |人脸模型id (当前无需关注)| 人脸注册结果示例: ~~~ { "ret": 0, "suc": 1, "rgn": 1, "sst": "enroll", "ssub": "ifr", "fid": "90f821fa7381ee297a80ed9570dea635" } ~~~ ### 声纹注册字段 |JSON字段 |类型 |说明| |:---:|:---:|---| |ssub |String| 业务类型,声纹业务为ivp | |sst |String |子业务类型,注册业务为enroll| |ret |int |返回值,0为请求成功,其他为请求失败| |rgn| int |本次注册需要的训练次数| |suc| int |本次注册已成功的训练次数| |vid| String |声纹模型id (当前无需关注)| 声纹注册结果示例: ~~~ { "vid": "16eb6a9f24c96405647347f8458e4cea", "suc": 5, "rgn": 5, "sst": "enroll", "ssub": "ivp", "ret": 0 } ~~~ ### 人脸、声纹和融合验证字段 |JSON字段| 类型| 说明| |:---:|:---:|---| |ssub |String| 业务类型,取值:<br>ivp:声纹验证;<br>ifr:人脸验证; <br>ivp \| ifr:融合验证;| |sst |String| 子业务类型,验证业务为verify| |ret |int |返回值,0为请求成功,其他为请求失败| |decision |String |accepted:验证成功,rejected:验证失败| |fusion _score |double| 相似度得分,仅验证业务返回| |face _score |double |人脸验证得分,仅验证业务返回| |voice _score| double |声纹验证得分,仅验证业务返回| 验证结果示例: ~~~ { "ret": 0, "face_score": 99.732, "voice_score": 86.874, "ssub": "ivp|ifr", "decision": "accepted", "fusion_score": 99.823, "sst": "verify" } ~~~ ### 人脸、声纹鉴别字段 |JSON字段 |类型| 说明| |:---:|:---:|---| |sst| String| 业务类型,鉴别业务为identify| |ssub |String |子业务类型,取值:<br>ivp:声纹;<br>ifr:人脸;| |ret |int |返回值,0为请求成功,其他为请求失败| |group_id| String| 本次鉴别的成员组id| |group_name |String |本次鉴别的成员组id对应的组名称| |topc |int |本次鉴别返回的结果数| |model_id |String| 模型id| |decision |String |accepted:匹配成功,rejected:匹配失败| |score |double |匹配相似度| |user_name| String |该模型对应用户名| 鉴别结果示例: ~~~ { "ret": 0, "group_id": "xxxxxx", "group_name": "xxxxxx", "ifv_result": { "candidates": [ { "model_id": "xxxxxxxx", "decision": "accepted", "score": 88.888888, "user": "user_name" } ] }, "sst": "identify", "ssub": "ivp", "topc": 1 } ~~~ ### 查询/删除模型字段 |JSON字段| 类型| 说明| |:---:|:---:|---| |ssub |String| 业务类型,取值:<br>ivp:声纹业务;<br>ifr:人脸业务(暂无查询业务);| |ret |int |返回值,0为请求成功,其他为请求失败| |sst |String |子业务类型,取值:<br>query:查询模型;<br>delete:删除模型;| 查询结果示例 : ~~~ { "ssub": "ivp", "sst": "query", "ret": 0 } ~~~ 删除结果示例: ~~~ { "ssub": "ivp", "sst": "delete", "ret": 0 } ~~~ ### 组管理字段 |JSON字段| 类型| 说明| |:---:|:---:|---| |ssub |String |ipt:组管理| |ret| int| 返回值,0为请求成功,其他为请求失败| |group_name |String| 组名称| |group_id |String |组id| |person |array |组内成员集| |user |String |用户名| 创建组结果示例: ~~~ { "ssub": "ipt", "group_name": " xxxxxxxx ", "sst": "add", "ret": 0, "group_id": "xxxxxxxx" } ~~~ 删除组结果示例: ~~~ { "ssub": "ipt", "group_name": " xxxxxxxx ", "sst": "delete", "ret": 0, "group_id": " xxxxxxxx " } ~~~ 查询组中人员结果示例: ~~~ { "ssub": "ipt", "person": [ { "user": " xxxxxxxx " } ], "group_name": " xxxxxxxx ", "sst": "query", "ret": 0, "group_id": " xxxxxxxx " } ~~~ 用户加入组结果示例: ~~~ { "ssub": "ipt", "group_name": " xxxxxxxx ", "ret": 0, "sst": "add", "user": " xxxxxxxx ", "group_id": " xxxxxxxx " } ~~~ 用户退出组结果示例: ~~~ { "ssub": "ipt", "group_name": " xxxxxxxx ", "ret": 0, "sst": "delete", "user": " xxxxxxxx ", "group_id": " xxxxxxxx " } ~~~ ## 合成发音人列表 1、 语言为中英文的发音人可以支持中英文的混合朗读。 2、 英文发音人只能朗读英文,中文无法朗读。 3、 汉语发音人只能朗读中文,遇到英文会以单个字母的方式进行朗读。 4、 使用**新引擎参数**会获得更好的合成效果。 |名称|属性|语言|参数名称|新引擎参数|备注| |:---:|:---:|:---:|:---:|:---:|:---:| |小燕|青年<br>女声|中英文<br>(普通话)|xiaoyan| |默认| |小宇|青年<br>男声|中英文<br>(普通话)|xiaoyu| | | |凯瑟琳|青年<br>女声|英文|catherine| | | |亨利|青年<br>男声|英文|henry| | | |玛丽|青年<br>女声|英文|vimary| | | |小研|青年<br>女声|中英文<br>(普通话)|vixy| | | |小琪|青年<br>女声|中英文<br>(普通话)|vixq|xiaoqi| | |小峰|青年<br>男声|中英文<br>(普通话)|vixf| | | |小梅|青年<br>女声|中英文<br>(粤语)|vixm|xiaomei| | |小莉|青年<br>女声|中英文<br>(台湾普通话)|vixl|xiaolin| | |小蓉|青年<br>女声|汉语<br>(四川话)|vixr|xiaorong| | |小芸|青年<br>女声|汉语<br>(东北话)|vixyun|xiaoqian| | |小坤|青年<br>男声|汉语<br>(河南话)|vixk|xiaokun| | |小强|青年<br>男声|汉语<br>(湖南话)|vixqa|xiaoqiang| | |小莹|青年<br>女声|汉语<br>(陕西话)|vixying| | | |小新|童年<br>男声|汉语<br>(普通话)|vixx|xiaoxin| | |楠楠|童年<br>女声|汉语<br>(普通话)|vinn|nannan| | |老孙|老年<br>男声|汉语<br>(普通话)|vils| | | |Mariane| |法语|Mariane| | | |Allabent| |俄语|Allabent| | | |Gabriela| |西班牙语|Gabriela| | | |Abha| |印地语|Abha| | | |XiaoYun| |越南语|XiaoYun| | | ## 错误码列表 10000~19999的错误码参见[MSC错误码](http://www.xfyun.cn/index.php/default/doccenter/doccenterInner?itemTitle=ZmFx&anchor=Y29udGl0bGU2Ng==)。 其它错误码参见下表: |错误码|数值|含义| |:---:|:---:|:---:| |ERROR_NO_NETWORK|20001|无有效的网络连接| |ERROR_NETWORK_TIMEOUT|20002|网络连接超时| |ERROR_NET_EXPECTION|20003|网络连接发生异常| |ERROR_INVALID_RESULT|20004|无有效的结果| |ERROR_NO_MATCH|20005|无匹配结果| |ERROR_AUDIO_RECORD|20006|录音失败| |ERROR_NO_SPPECH|20007|未检测到语音| |ERROR_SPEECH_TIMEOUT|20008|音频输入超时| |ERROR_EMPTY_UTTERANCE|20009|无效的文本输入| |ERROR_FILE_ACCESS|20010|文件读写失败| |ERROR_PLAY_MEDIA|20011|音频播放失败| |ERROR_INVALID_PARAM|20012|无效的参数| |ERROR_TEXT_OVERFLOW|20013|文本溢出| |ERROR_INVALID_DATA|20014|无效数据| |ERROR_LOGIN|20015|用户未登录| |ERROR_PERMISSION_DENIED|20016|无效授权| |ERROR_INTERRUPT|20017|被异常打断| |ERROR_VERSION_LOWER|20018|版本过低| ## 集成帮助文档 打开终端(termainl或iterm),cd 到压缩包的doc 目录,执行以下命令: ~~~ cp -R -f -a com.iflytek.IFlyMSC.docset ~/Library/Developer/Shared/Documentation/DocSets/ ~~~ 然后执行命令: ~~~ open ~/Library/Developer/Shared/Documentation/DocSets/ ~~~ **注意**:*不同的Xcode版本,对应的docset路径可能有变化,需要根据实际路径来操作。(例如:/Applications/Xcode.app/Contents/Developer/Documentation/DocSets/)* 请核对文档的版本为最新下载的版本: ![](https://box.kancloud.cn/32569ace00a25ec226cbc8f7c876fe98_551x447.jpg) 打开Xcode的帮助文档就可以看到已经集成的文档: ![](https://box.kancloud.cn/047561ae8865c9cf8740d2a59abcadc8_3420x1908.png)