美文网首页
SKILL技术简介

SKILL技术简介

作者: TTTTTriM | 来源:发表于2018-01-03 20:22 被阅读201次

    AMAZON ALEXA SKILL

    What Is an Alexa Skill?
    Alexa is Amazon’s voice service and the brain behind tens of millions of devices like the Amazon Echo, Echo Dot, and Echo Show. Alexa provides capabilities, or skills, that enable customers to create a more personalized experience. There are now tens of thousands of skills from companies like Starbucks, Uber, and Capital One as well as other innovative designers and developers.


    AMAZON SKILL列表.png

    腾讯小微SKILL

    小微AI能力集成了人脸识别,TTS声音,情绪识别,人体识别,实时翻译,图片识别,人机对话,,文本摘要,人机对话等等,当提供了足够多的对话数据后,我们能够帮助客户提供基于该数据的机器自动对话能力,乐意用于开发制作个人对话机器人、客服机器人、聊天帮助插件等等。

    小微SKILL列表.png

    内置SKILL与自定义SKILL

    AMAZON ECHO内置

    在线的音乐播放 : 依赖spotify(premium必须)和amazon music(prime必须)
    定制的新闻获取:例如sport news和flash brief
    通常的信息获取:搜索引擎语音查询,交通和地理信息,天气和时间,亚马逊相关信息(订单和快递)
    简单的生活助手:设置闹钟,计时器,日程表,todo和shopping list
    智能设备控制:语音控制大量智能家电设备

    小微内置

    内置SKILL.png

    自定义SKILL

    1. 创建自定义SKILL --- 语料配置
    2. 创建自定义SKILL --- 逻辑控制
    3. 自定义SKILL --- 机器人语音模块集成SKILL SDK
    4. 自定义SKILL --- 交互流程
    创建自定义SKILL --- 语料配置
    自定义语料.png

    小微SKILL语料配置

    技能名称:       UBT服务升级
    领域(Domain): ubt_service_update
    ======================================================
    意图(Intent): general_update
        参数: actio     usr.serviceupdate.action      // 参数标识     参数类型
              service     usr.serviceupdate.service
    
    语料 general_update_corpus
    ======================================================
    <action>升级</action>最新<service>系统</service>
    <service>服务</service>可以<action>升级</action>到最新吗?
    有最新<service>系统</service>可以<action>安装</action>吗?
    
    槽位词 usr.serviceupdate.action
    ======================================================
    升级|更新
    下载
    刷|刷新,刷机
    检测|检查,查看
    安装
    
    槽位词 usr.serviceupdate.service
    ======================================================
    系统
    固件
    软件
    服务|主服务
    文件
    程序
    

    ALEXA SKILL语料配置

    utterances
    ======================================================
    photoone {photoone}
    phototake  take a {phototake}
    
    intentschema
    ======================================================
    {
          "intent": "Photoone",
          "slots": [
            {
              "name": "slot_photo_one",
              "type": "LIST_OF_PHOTO_ONE"
            }
           ]
    },
    {
          "intent": "Phototake",
          "slots": [
            {
              "name": "slot_photo_take",
              "type": "LIST_OF_PHOTO_TAKE"
            }
           ]
    }
    
    槽值 list_of_photo_one 
    ======================================================
    photo
    a photo
    some photos
    picture
     ...
    
    
    槽值 list_of_photo_take
    ======================================================
    a picture
    some pictures
    a photo
    some photos
    picture
     ...
    
    
    创建自定义SKILL --- 逻辑控制
    SKILL逻辑控制流程.png

    AMAZON ALEXA 集成自定义SKILL

    https://aws.amazon.com/cn/blogs/china/lambda-alexa-echo/

    小微集成自定义SKILL

    需要自定义后台服务配置对应SKILL控制逻辑,进行方法回调

    public String dingdangCallback(HttpServletRequest request, @RequestBody Map<String, Object> requestMap) {
        // 1. 验证请求是否来自叮当skill
        String skillSecret = SecretUtil.HMACSHA256(xxxxx);
                  
        if (StringUtils.isNotEmpty(signature) && signature.equalsIgnoreCase(skillSecret)) {
            // 2. 从会话Map中解析skill domain & intent & userId
            String domain = xxxx;
            String intent = xxxx;
            String userId = xxxx;
    
            // 3. 从请求map中解析出slots
            List<Map<String, Object>> slotMapList = xxxx;
    
            // 4. 判断处理请求
            if (DingDangConstant.DOMAIN_ROBOT_CONTROL.equals(domain)) {
                if (DingDangConstant.INTENT_GENERAL_UPDATE.equals(intent)) {
                        //5. 推送逻辑控制指令数据给机器人
                        IMUtil.send(xxxxxxx);
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
        }else{
            //6. 推送正常闲聊语句给机器人
            IMUtil.send(xxxxxxx);
        }
    }
    
    自定义SKILL --- 机器人语音模块集成SKILL SDK*
    自定义SKILL --- 交互流程*
    SKILL交互流程.png

    相关文章

      网友评论

          本文标题:SKILL技术简介

          本文链接:https://www.haomeiwen.com/subject/xrtknxtx.html