diff --git a/speech/composer.json b/speech/composer.json index 4e10c30a50..7bc19eea41 100644 --- a/speech/composer.json +++ b/speech/composer.json @@ -1,6 +1,6 @@ { "require": { - "google/cloud-speech": "^1.0.0", - "google/cloud-storage": "^1.20.1" + "google/cloud-speech": "^1.16", + "google/cloud-storage": "^1.36" } } diff --git a/speech/quickstart.php b/speech/quickstart.php index 742e5892d7..ffde19efd3 100644 --- a/speech/quickstart.php +++ b/speech/quickstart.php @@ -20,10 +20,10 @@ require __DIR__ . '/vendor/autoload.php'; # Imports the Google Cloud client library -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; # The name of the audio file to transcribe $gcsURI = 'gs://cloud-samples-data/speech/brooklyn_bridge.raw'; diff --git a/speech/src/multi_region_gcs.php b/speech/src/multi_region_gcs.php index 2d65a9a783..b2cba03b8a 100644 --- a/speech/src/multi_region_gcs.php +++ b/speech/src/multi_region_gcs.php @@ -19,10 +19,10 @@ # [START speech_transcribe_with_multi_region_gcs] # Imports the Google Cloud client library -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $uri The Cloud Storage object to transcribe diff --git a/speech/src/profanity_filter.php b/speech/src/profanity_filter.php index cbe5ba5554..9e786e0a87 100644 --- a/speech/src/profanity_filter.php +++ b/speech/src/profanity_filter.php @@ -15,10 +15,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_profanity_filter] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $audioFile path to an audio file diff --git a/speech/src/profanity_filter_gcs.php b/speech/src/profanity_filter_gcs.php index 609e19e9c1..9dd7855703 100644 --- a/speech/src/profanity_filter_gcs.php +++ b/speech/src/profanity_filter_gcs.php @@ -15,10 +15,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_profanity_filter_gcs] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $uri The Cloud Storage object to transcribe (gs://your-bucket-name/your-object-name) diff --git a/speech/src/streaming_recognize.php b/speech/src/streaming_recognize.php index 2465de4aee..8b0210381d 100644 --- a/speech/src/streaming_recognize.php +++ b/speech/src/streaming_recognize.php @@ -24,11 +24,11 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_streaming] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionConfig; +use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\StreamingRecognitionConfig; use Google\Cloud\Speech\V1\StreamingRecognizeRequest; -use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; /** * @param string $audioFile path to an audio file diff --git a/speech/src/transcribe_async.php b/speech/src/transcribe_async.php index 99fe72157c..afb642a2ef 100644 --- a/speech/src/transcribe_async.php +++ b/speech/src/transcribe_async.php @@ -24,10 +24,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_async] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $audioFile path to an audio file diff --git a/speech/src/transcribe_async_gcs.php b/speech/src/transcribe_async_gcs.php index 75d050091f..8d96dd7807 100644 --- a/speech/src/transcribe_async_gcs.php +++ b/speech/src/transcribe_async_gcs.php @@ -24,10 +24,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_async_gcs] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $uri The Cloud Storage object to transcribe (gs://your-bucket-name/your-object-name) diff --git a/speech/src/transcribe_async_words.php b/speech/src/transcribe_async_words.php index 0e7f12c0d3..b807c100c4 100644 --- a/speech/src/transcribe_async_words.php +++ b/speech/src/transcribe_async_words.php @@ -24,10 +24,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_async_word_time_offsets_gcs] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $audioFile path to an audio file diff --git a/speech/src/transcribe_auto_punctuation.php b/speech/src/transcribe_auto_punctuation.php index 2eb1808f05..9189c712f0 100644 --- a/speech/src/transcribe_auto_punctuation.php +++ b/speech/src/transcribe_auto_punctuation.php @@ -24,10 +24,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_auto_punctuation] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $audioFile path to an audio file diff --git a/speech/src/transcribe_enhanced_model.php b/speech/src/transcribe_enhanced_model.php index 8341552523..4758c62beb 100644 --- a/speech/src/transcribe_enhanced_model.php +++ b/speech/src/transcribe_enhanced_model.php @@ -24,10 +24,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_enhanced_model] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $audioFile path to an audio file diff --git a/speech/src/transcribe_model_selection.php b/speech/src/transcribe_model_selection.php index 3d5a97385f..fadf6c0303 100644 --- a/speech/src/transcribe_model_selection.php +++ b/speech/src/transcribe_model_selection.php @@ -24,10 +24,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_model_selection] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $audioFile path to an audio file diff --git a/speech/src/transcribe_sync.php b/speech/src/transcribe_sync.php index 82defef734..2e7763e12a 100644 --- a/speech/src/transcribe_sync.php +++ b/speech/src/transcribe_sync.php @@ -24,10 +24,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_sync] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $audioFile path to an audio file diff --git a/speech/src/transcribe_sync_gcs.php b/speech/src/transcribe_sync_gcs.php index 542f7c0e0f..7a308cd23d 100644 --- a/speech/src/transcribe_sync_gcs.php +++ b/speech/src/transcribe_sync_gcs.php @@ -24,10 +24,10 @@ namespace Google\Cloud\Samples\Speech; # [START speech_transcribe_sync_gcs] -use Google\Cloud\Speech\V1\SpeechClient; use Google\Cloud\Speech\V1\RecognitionAudio; use Google\Cloud\Speech\V1\RecognitionConfig; use Google\Cloud\Speech\V1\RecognitionConfig\AudioEncoding; +use Google\Cloud\Speech\V1\SpeechClient; /** * @param string $uri The Cloud Storage object to transcribe (gs://your-bucket-name/your-object-name) diff --git a/speech/test/quickstartTest.php b/speech/test/quickstartTest.php index d958182ff9..a109bef994 100644 --- a/speech/test/quickstartTest.php +++ b/speech/test/quickstartTest.php @@ -14,8 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -use PHPUnit\Framework\TestCase; use Google\Cloud\TestUtils\TestTrait; +use PHPUnit\Framework\TestCase; class quickstartTest extends TestCase {