php-docs-samples
php-docs-samples copied to clipboard
Speech: longRunningRecognize pollUntilCOmplete has deprecated php codes
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
@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?
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!