Skip to content

Commit bc3482f

Browse files
committed
change
1 parent 65cbb61 commit bc3482f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

speech/src/transcribe_sync.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@
6767
$mostLikely = $alternatives[0];
6868
$transcript = $mostLikely->getTranscript();
6969
$confidence = $mostLikely->getConfidence();
70-
printf('Transcript: %s' . PHP_EOL, $transcript);
71-
$result = Array();
72-
$result['result'] = (utf8_encode($transcript));
73-
echo json_encode($result);
70+
// printf('Transcript: %s' . PHP_EOL, $transcript);
71+
//$result = Array();
72+
$result = htmlentities((string)$transcript);
73+
echo '{result: "'.$result.'"}';
74+
// echo json_encode($result);
7475
break;
7576
// printf('Confidence: %s' . PHP_EOL, $confidence);
7677
}

0 commit comments

Comments
 (0)