Use Stringee's Silence Detection feature along with an AI BOT to build auto answer system

Published 2019-05-27

Step 1:

Config AnswerURL for the number, which will return SCCO like the sample in this link: http://test3.stringee.com/tmp/test-record-msg.php

[   

    {
        "action": "talk",
        "text": "Thank you for contacting Company XYZ, please say your question after the beep sound, you can finish your question by pressing # or keeping silent in 4 seconds",
        "voice": "hn_male_xuantin_vdts_48k-hsmm",
        "speed": 0,
        "bargeIn": true,
        "loop": 1
    },
    {
        "action": "recordMessage",
        "eventUrl": "https://sample.com/tmp/url_for_receive_record_msg.php",
        "beepStart": "true",
        "timeout": "600000",
        "format": "wav",
        "silenceThresh": 12,
        "silenceTimeout": 4000
    },
    {
        "action": "talk",
        "text": "Our system received your question, we're finding the answer, please wait a moment.",
        "voice": "hn_male_xuantin_vdts_48k-hsmm",
        "speed": 0,
        "bargeIn": true,
        "loop": 1
    },
    {
        "action": "talk",
        "text": ". . . . .  . . . .  . . . . . . . .  . . . . . . . . . . . .",
        "voice": "hn_male_xuantin_vdts_48k-hsmm",
        "speed": 0,
        "bargeIn": false,
        "loop": 100000
    }

]
  • Action 1: Greeting message and instructions.
  • Action 2: Allow the caller to read the question, after continuous 4000ms (silinceTimeout) with the sound threshold below 12 (silenceThresh, varies from 0 to 100, the higher number the higher threshold) the message ends automatically; Caller can also end the message by pressing #.
  • Action 3: Notify caller that the message is received (optional).
  • Action 4: Emit the "Silent" sound while waiting for an answer from the BOT AI to avoid the call being ended because there are no actions left.

Step 2:

Retrieve the record

Stringee Server will send HTTP POST to the URL https://sample.com/tmp/url_for_receive_record_msg.php which contains a link to download messages from the caller. To download, read instructions here: https://developer.stringee.com/docs/record-call.

Step 3:

Response

After retrieving the message, AI will convert speech to text, generate the answer and send the answer to the caller using REST API "Put actions" (more details of this API at https://developer.stringee.com/docs/call-rest-api/call-rest-api-put-actions-scco)

{
    "callId": "call-vn-1-KEQ7Z8CCEY-1556463530653",
    "actions": [
        {
            "action": "talk",
            "text": "The answer is B. You can ask another question",
            "voice": "hn_male_xuantin_vdts_48k-hsmm",
            "speed": 0,
            "bargeIn": true,
            "loop": 1
        },
        {
            "action": "recordMessage",
            "eventUrl": "https://test3.stringee.com/tmp/test-record-msg.php",
            "beepStart": "true",
            "timeout": "600000",
            "format": "wav",
            "silenceThresh": 12,
            "silenceTimeout": 4000
        },
        {
            "action": "talk",
            "text": "Our system received your question, we're finding the answer, please wait a moment.",
            "voice": "hn_male_xuantin_vdts_48k-hsmm",
            "speed": 0,
            "bargeIn": true,
            "loop": 1
        },
        {
            "action": "talk",
            "text": ". . . . .  . . . .  . . . . . . . .  . . . . . . . . . . . .",
            "voice": "hn_male_xuantin_vdts_48k-hsmm",
            "speed": 0,
            "bargeIn": false,
            "loop": 100000
        }

    ]
}