Code: <?php function speechOut($words) { header('Content-type: application/json'); $open = '{"version": "1.0","sessionAttributes":"","response":{"outputSpeech":{"type": "PlainText","text": "'; $close = '"},"shouldEndSession": false}}'; echo $open; echo ($words); echo $close; } $data = json_decode(file_get_contents('php://input'), TRUE); $text = print_r($data,true); $ver = $data['session'][sessionId]; file_put_contents('what_amazon_is_saying.txt', $text); file_put_contents('speech_command.txt',$ver); //speechOut("Say what you want now! now!"); //speechOut($ver); speechOut('are you still listening?'); ?> This is useful and has a speechOut() function. I can tail the two output files to see the conversation between echo and my script.