php-docs-samples icon indicating copy to clipboard operation
php-docs-samples copied to clipboard

Speech: longRunningRecognize pollUntilCOmplete has deprecated php codes

Open chapman-cc opened this issue 3 years ago • 1 comments

Running the longRunningRecognize code :

$op = $speechCLient->longRunningRecognize($config, $audio);
$op->pollUntilComplete(); 
...others 

would return the following warning/error

PHP Deprecated:  Implicit conversion from float 1687.5 to int loses precision in /path/to/php/project/root/vendor/google/gax/src/PollingTrait.php on line 93

chapman-cc avatar Sep 23 '22 04:09 chapman-cc

@ChapmanCheng Can you provide more information on your issue? for instance what are the values of $config and $audio and $speechClient? What version of the speech library and you using? What version of PHP are you using? what platform (linux, macOS, Windows, etc.) are you using?

mattcarrollcode avatar Sep 23 '22 22:09 mattcarrollcode

These samples were relatively recently refactored to follow new sample format standards (https://github.com/GoogleCloudPlatform/php-docs-samples/pull/1642) and I believe were all tested at the time. Without additional info, I can't repro this further. @chapman-cc if you are still encountering this, can you please file a new issue? Thanks!

meredithslota avatar Feb 02 '23 01:02 meredithslota