alphacep / alphacep/vosk-server

Getting different outputs in php client samples

Offen
#161 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
1.3k
Forks
317
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

I'm running this code in vosk-server/client-samples/php/asr-test passing the same file that i am passing to python client but this file is not returning correct output it is different from the output that i have got with python script.

```
require_once("./vendor/autoload.php");

use WebSocket\Client;

$client = new Client("ws://localhost:2700/", array('timeout' => 20000));
$myfile = fopen("test.wav", "rb");
while(!feof($myfile)) {
$data = fread($myfile, 8000);
$client->send($data, 'binary');
echo $client->receive() . "\n";
}
$client->send("{\"eof\" : 1}");
echo $client->receive() . "\n";
fclose($myfile);

?>

```
Output :

` { "partial" : "" } { "text" : "" }`

python output :
`{"result": [{"conf": 0.584788, "end": 5.039281, "start": 4.86, "word": "test"}, "test"]}`

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.