summaryrefslogtreecommitdiffstats
path: root/meta-speech-framework
AgeCommit message (Collapse)AuthorFilesLines
2019-09-25alexa-voiceagent-service: Add patch to update audio device configurationScott Murray2-0/+198
Add patch to update audio device configuration to work with PipeWire changes to Auto SDK gstreamer output code. Bug-AGL: SPEC-2761 Change-Id: If7d1058a190bd91bd68151a5b54dc84db05a55bc Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2019-09-21meta-speech-framework: aac-module-gstreamer: Add PipeWire support patchScott Murray2-0/+98
Add a version of George's PipeWire support patch updated for the new gstreamer module in Alexa Auto SDK 2.0 to the aac-module-gstreamer bbappend. Bug-AGL: SPEC-2761 Change-Id: I4787d365664089848a9ffa3be1ee646766f6c931 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2019-09-18alexa-voiceagent-service: Update config.xml.inScott Murray2-0/+32
Add a patch to alexa-voiceagent-service recipe to update its config.xml.in to remove the now unneeded 4A dependency and add the now required new audio permission. Bug-AGL: SPEC-2765 Change-Id: I884bd7cfa45e598ecc06e1d6b1adde61a82f8db5 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2019-09-12Add agl-voiceagent-alexa featureScott Murray7-2/+98
Add feature and associated recipes and bbappends to enable building the Amazon Alexa voice agent for the speech framework using the Alexa Automotive SDK 2.0 release. A separate feature is used to accomodate potentially building with a different voiceagent provider. Some follow on development is required to add PipeWire support to the new gstreamer extension added in AAC 2.0, see SPEC-2767. Bug-AGL: SPEC-2765 Change-Id: Ie6e8f6a7965f8014ca2e64a2535faec073e320bc Signed-off-by: Scott Murray <scott.murray@konsulko.com>
2019-04-25meta-speech-framework: add RDEPEND for agl-service-high-capabilitiesThierry Bultel1-1/+2
agl-service-high-capabilities is needed by the speech framework. Change-Id: I79935a1ff45d85e641215ad3cedf495f07eee606 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-04-09Upgrade to thudScott Murray1-0/+2
Changes include: - Add LAYERSERIES_COMPAT definitions to layer.conf files - Disable pulseaudio-module-4a-client for now as it does not compile against PulseAudio 12.x - Remove meta-audio-4a-framework/recipes-devtools/python/python3-websockets_4.0.1.bb as it is superseded by upstream - Add OECMAKE_GENERATOR = "Unix Makefiles" to 4a-alsa-core, 4a-hal-generic, 4a-hal-unicens, and 4a-softmixer recipes for now to work around CMake+ninja issue - Remove alsa 1.1.6 recipes from meta-audio-4a-framework/recipes-multimedia/alsa as they are superseded by upstream. Local changes to the alsa-plugins recipe have been implemented in a bbappend. Known issues: - pulseaudio-module-4a-client has been disabled - CMake+ninja issue in cmake-apps-module has been worked around with OECMAKE_GENERATOR Bug-AGL: SPEC-1837 Change-Id: I5355e9f74e2385a093ca21cda5bd52a80e1a6e67 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
2019-03-27agl-service-voice-high-capabilities: added recipeThierry Bultel1-0/+19
This adds a recipe for agl-service-voice-high-capabilities Change-Id: Ie45f71d4a2c0faf943328230ca3b3c24fe76fe6f Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2019-03-21agl-service-voice-high: bump to latest versionThierry Bultel1-6/+6
This brings the following commits: * 9eb3a90 Refactored VSHL into vshl-core and vshl-capabilities. * 143363b Initial .gitreview * 4082dd6 Code Base Linking based authentication implementation for Al.. * 3c87e5c Added the Alexa VoiceAgent dependency in the VSHL widget con.. * bba1c5e config.cmake: Remove superfluous dependencies * d828cc4 Use latest AGL Framework code for javascript * c9e18e6 Also provide HTML user app for testing Change-Id: Id4a04515df0c4ec5ba0f1467d8e3f17f1b9924e9 Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-11-30speech-framework: Add initial speech-framework featureShotaro Uchida3-0/+28
Change-Id: I458161fea56928e338c1fe208e643e9a33141f6e Signed-off-by: Shotaro Uchida <shotaru@amazon.com>
Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
    var afb = new AFB("api", "mysecret");
    var ws;
    var sndcard="HALNotSelected";
    var evtidx=0;
    var numid=0;

    function syntaxHighlight(json) {
        if (typeof json !== 'string') {
             json = JSON.stringify(json, undefined, 2);
        }
        json = json.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
        return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
            var cls = 'number';
            if (/^"/.test(match)) {
                if (/:$/.test(match)) {
                    cls = 'key';
                } else {
                    cls = 'string';
                }
            } else if (/true|false/.test(match)) {
                cls = 'boolean';
            } else if (/null/.test(match)) {
                cls = 'null';
            }
            return '<span class="' + cls + '">' + match + '</span>';
        });
    }

    function getParameterByName(name, url) {
        if (!url) {
          url = window.location.href;
        }
        name = name.replace(/[\[\]]/g, "\\$&");
        var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
            results = regex.exec(url);
        if (!results) return null;
        if (!results[2]) return '';
        return decodeURIComponent(results[2].replace(/\+/g, " "));
    }

    // default soundcard is "PCH"
    var devid=getParameterByName("devid");
    if (!devid) devid="hw:1";

    var haldev=getParameterByName("haldev");
    if (!haldev) haldev="scarlett-usb";

    var sndname=getParameterByName("sndname");
    if (!sndname) sndname="PCH";

    var mode=getParameterByName("mode");
    if (!mode) mode="0";




    function replyok(obj) {
            console.log("replyok:" + JSON.stringify(obj));
            document.getElementById("output").innerHTML = "OK: "+ syntaxHighlight(obj);
    }

    function replyerr(obj) {
            console.log("replyerr:" + JSON.stringify(obj));
            document.getElementById("output").innerHTML = "ERROR: "+ syntaxHighlight(obj);
    }

    function gotevent(obj) {
            console.log("gotevent:" + JSON.stringify(obj));
            document.getElementById("outevt").innerHTML = (evtidx++) +": "+JSON.stringify(obj);
    }

    function send(message) {
            var api = document.getElementById("api").value;
            var verb = document.getElementById("verb").value;
            document.getElementById("question").innerHTML = "subscribe: "+api+"/"+verb + " (" + JSON.stringify(message) +")";
            ws.call(api+"/"+verb, {data:message}).then(replyok, replyerr);
    }


     // On button click from HTML page
    function callbinder(api, verb, query) {
            console.log ("subscribe api="+api+" verb="+verb+" query=" +query);
            var question = urlws +"/" +api +"/" +verb + "?query=" + JSON.stringify(query);
            document.getElementById("question").innerHTML = syntaxHighlight(question);
            ws.call(api+"/"+verb, query).then(replyok, replyerr);
    }


    // Retreive Select value and Text from the binder
    // Note: selection of value/text for a given context is huggly!!!
    function querySelectList (elemid, api, verb, query) {

        console.log("querySelectList elemid=%s api=%s verb=%s query=%s", elemid, api, verb, query);

        var selectobj = document.getElementById(elemid);
        if (!selectobj) {
            return;
        }

        // onlick update selected HAL api
        selectobj.onclick=function(){
           sndcard= this.value;
           console.log ("Default Selection=" + sndcard);
        };

        function gotit (result) {

            // display response as for normal onclick action
            replyok(result);
            var response=result.response;

            // fulfill select with avaliable active HAL
            for (idx=0; idx<response.length; idx++) {
                var opt = document.createElement('option');

                // Alsa LowLevel selection mode
                if (response[idx].name)  opt.text   = response[idx].name;
                if (response[idx].devid) opt.value  = response[idx].devid;

                // HAL selection mode
                if (response[idx].shortname) opt.text  = response[idx].shortname;
                if (response[idx].api) opt.value = response[idx].api;

                selectobj.appendChild(opt);
            }

           sndcard= selectobj.value;
        }

        var question = urlws +"/"+api +"/" +verb + "?query=" + JSON.stringify(query);
        document.getElementById("question").innerHTML = syntaxHighlight(question);

        // request lowlevel ALSA to get API list
        ws.call(api+"/"+verb, query).then(gotit, replyerr);
    }

    function refresh_list (self, api, verb, query) {
        console.log("refresh_list id=%s api=%s verb=%s query=%s", self.id, api, verb, query);

        if (self.value > 0) return;

        // onlick update selected HAL api
        self.onclick=function(){
           numid = parseInt(self.value);
           console.log ("Default numid=%d", numid);
        };

        function gotit (result) {

            // display response as for normal onclick action
            replyok(result);
            var response=result.response;



            // fulfill select with avaliable active HAL
            for (idx=0; idx<response.length; idx++) {
                var opt = document.createElement('option');

                // Alsa LowLevel selection mode
                opt.text   = response[idx].name + ' id=' + response[idx].id;
                opt.value  = response[idx].id;

                self.appendChild(opt);
            }
            self.selectedIndex=2;
            numid = parseInt (self.value);
        }

        var question = urlws +"/"+api +"/" +verb + "?query=" + JSON.stringify(query);
        document.getElementById("question").innerHTML = syntaxHighlight(question);

        // request lowlevel ALSA to get API list
        ws.call(api+"/"+verb, query).then(gotit, replyerr);
    }


    function init(elemid, api, verb, query) {

        function onopen() {
                // check for active HALs
                querySelectList (elemid, api, verb, query);

                document.getElementById("main").style.visibility = "visible";
                document.getElementById("connected").innerHTML = "Binder WS Active";
                document.getElementById("connected").style.background  = "lightgreen";
                ws.onevent("*", gotevent);
        }

        function onabort() {
                document.getElementById("main").style.visibility = "hidden";
                document.getElementById("connected").innerHTML = "Connected Closed";
                document.getElementById("connected").style.background  = "red";

        }
        ws = new afb.ws(onopen, onabort);
    }