based on the var_dump
object(Att\Api\Speech\SpeechResponse)#8 (3) { ["_responseId":"Att\Api\Speech\SpeechResponse":private]=> string(32) "0135b50eb1a47009d4ef5af98bce7c9a" ["_status":"Att\Api\Speech\SpeechResponse":private]=> string(2) "OK" ["_NBest":"Att\Api\Speech\SpeechResponse":private]=> object(Att\Api\Speech\NBest)#7 (7) { ["_hypothesis":"Att\Api\Speech\NBest":private]=> string(14) "Boston Celtics" ["_languageId":"Att\Api\Speech\NBest":private]=> string(5) "en-US" ["_confidence":"Att\Api\Speech\NBest":private]=> float(0.239999995) ["_grade":"Att\Api\Speech\NBest":private]=> string(6) "accept" ["_resultText":"Att\Api\Speech\NBest":private]=> string(15) "Boston Celtics." ["_words":"Att\Api\Speech\NBest":private]=> array(2) { [0]=> string(6) "Boston" [1]=> string( "Celtics." } ["_wordScores":"Att\Api\Speech\NBest":private]=> array(2) { [0]=> float(0.239) [1]=> float(0.239) } } }
The responseId and Status are strings. But NBest is an Object which hold hypothesis, resulttext, etc
There is a funtion getNBest (SpeechResponse.php)
The file NBest.php has a function getHypothesis() and getResultText().
I'm guessing the call would be something like
echo $response->getNBest[NBest.ResultText];
No error but just blank display. I can't figure out the syntax
Thanks for your help.