Google\Cloud\Speech\Operation::results PHP Method

results() public method

Example: if ($operation->isComplete()) { $results = $operation->results(); }
See also: https://cloud.google.com/speech/reference/rest/v1beta1/speech/syncrecognize#SpeechRecognitionAlternative SpeechRecognitionAlternative
public results ( array $options = [] ) : array
$options array [optional] Configuration Options.
return array The transcribed results. Each element of the array contains a `transcript` key which holds the transcribed text. Optionally a `confidence` key holding the confidence estimate ranging from 0.0 to 1.0 may be present. `confidence` is typically provided only for the top hypothesis.
    public function results(array $options = [])
    {
        $info = $this->info($options);
        return isset($info['response']['results']) ? $info['response']['results'][0]['alternatives'] : [];
    }