检测 Google Home 或 Amazon 的 Alexa 的扬声器

Detect the speaker of Google Home or Amazon's Alexa

我想检测谁在与我的代理交互。

例如,我读到 Alexa 应该能够检测到不同的用户。 Google 主页广告也让我认为它应该检测谁在说话。那么我怎么才能看到谁在说话呢?

在 slack 中似乎更容易,因为众所周知谁在写。但是我看不到当前用户是谁。

Google Home 没有办法(至少目前)无法处理同一设备上的多个用户。

我发现了如何在 slack 中检测用户:如果你实现那个钩子你会得到这个例子 json:

{
    "id": "f7912345-e21c-450f-a8ca-d01e38012345",
    "timestamp": "2016-12-20T06:53:51.071Z",
    "result": {
        "source": "agent",
        "resolvedQuery": "echo hallo welt",
        "speech": "",
        "action": "",
        "actionIncomplete": false,
        "parameters": {
            "myInput": "hallo welt"
        },
        "contexts": [{
            "name": "generic",
            "parameters": {
                "slack_user_id": "U0AT12345",
                "myInput": "hallo welt",
                "slack_channel": "D3DR12345",
                "myInput.original": "hallo welt"
            },
            "lifespan": 4
        }],
        "metadata": {
            "intentId": "06212345-06a0-40fe-bbeb-9189db412345",
            "webhookUsed": "true",
            "webhookForSlotFillingUsed": "false",
            "intentName": "Response"
        },
        "fulfillment": {
            "speech": "",
            "messages": [{
                "type": 0,
                "speech": ""
            }]
        },
        "score": 0.75
    },
    "status": {
        "code": 200,
        "errorType": "success"
    },
    "sessionId": "10612345-c681-11e6-af08-875120912345",
    "originalRequest": {
        "source": "slack_testbot",
        "data": {
            "channel": "D3DR12345",
            "match": ["echo hallo welt"],
            "text": "echo hallo welt",
            "team": "T04H12345",
            "type": "message",
            "event": "direct_message",
            "user": "U0AT12345",
            "ts": "1482216830.000005"
        }
    }
}

因此,在松弛的情况下,您可以访问结果->上下文[0]->参数->slack_user_id。

Google Home 不断改进(甚至消除了我在最近的更新中遇到的开发障碍)。现在可以训练它识别您的声音和其他人的声音。

Tomato, tomahto. Google Home now supports multiple users