We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65cbb61 commit bc3482fCopy full SHA for bc3482f
speech/src/transcribe_sync.php
@@ -67,10 +67,11 @@
67
$mostLikely = $alternatives[0];
68
$transcript = $mostLikely->getTranscript();
69
$confidence = $mostLikely->getConfidence();
70
- printf('Transcript: %s' . PHP_EOL, $transcript);
71
- $result = Array();
72
- $result['result'] = (utf8_encode($transcript));
73
- echo json_encode($result);
+ // printf('Transcript: %s' . PHP_EOL, $transcript);
+ //$result = Array();
+ $result = htmlentities((string)$transcript);
+ echo '{result: "'.$result.'"}';
74
+ // echo json_encode($result);
75
break;
76
// printf('Confidence: %s' . PHP_EOL, $confidence);
77
}
0 commit comments