在lex响应中错误的inputTranscript

我试图testing亚马逊networking节点api sdk lexaudioinput和输出,并成功configuration它,但是当我testing它,它发送给我垃圾inputTranscript(如“是啊”,“哦,不”,“这是啊”等)作为回应。

请求参数如下,

var params = { botAlias: 'Test', /* required */ botName: 'Revert', /* required */ contentType: 'audio/l16; rate=16000; channels=1', /* required */ inputStream: <Buffer 52 49 46 46 80 55 02 00 57 41 56 45 66 6d 74 20 10 00 00 00 01 00 02 00 80 3e 00 00 00 7d 00 00 04 00 10 00 64 61 74 61 54 55 02 00 00 00 00 00 00 00 ... >, /* required */ userId: '12321', /* required */ accept: 'audio/*', sessionAttributes: {"firstName": "Joe"} }; 

我得到的回应如下,

 { contentType: 'audio/mpeg', sessionAttributes: { firstName: 'Joe' }, message: 'Sorry No Match', dialogState: 'ElicitIntent', inputTranscript: 'yeah', audioStream: <Buffer 49 44 33 04 00 00 00 00 00 23 54 53 53 45 00 00 00 0f 00 00 03 4c 61 76 66 35 37 2e 35 36 2e 31 30 31 00 00 00 00 00 00 00 00 00 00 00 ff f3 60 c4 00 ... > } 

对于录音我使用我的笔记本电脑内置的麦克风和RecordRTC API作为,

 recorder = RecordRTC(microphone, { type: 'audio', recorderType: StereoAudioRecorder, desiredSampRate: 16000 }); 

录制的语音被编码为base64并发送到节点服务器,在那里解码并以缓冲区格式发送给lex api。

Solutions Collecting From Web of "在lex响应中错误的inputTranscript"