Skip to content

Commit a4bab92

Browse files
authored
unset grpc version and other fixes (GoogleCloudPlatform#445)
1 parent 053cbc5 commit a4bab92

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ before_install:
4242
- mkdir -p build/logs
4343

4444
before_script:
45-
- travis_retry pecl install grpc-1.4.1
45+
- travis_retry pecl install grpc
4646

4747
script:
4848
- testing/run_all_tests.sh

spanner/test/spannerTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ public static function setUpBeforeClass()
5656
$instance = $spanner->instance(self::$instanceId);
5757

5858
$operation = $instance->create($configuration);
59-
$operation->pollUntilComplete();
59+
if (!$operation->pollUntilComplete()) {
60+
throw new \Exception($operation->error()['message']);
61+
}
6062

6163
self::$instance = $instance;
6264
}

speech/src/transcribe_sync_words.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function transcribe_sync_words($audioFile, $languageCode = 'en-US', $options = [
5858

5959
// Print the results
6060
foreach ($results as $result) {
61-
$alternative = $result->alternatives();
61+
$alternative = $result->alternatives()[0];
6262
printf('Transcript: %s' . PHP_EOL, $alternative['transcript']);
6363
printf('Confidence: %s' . PHP_EOL, $alternative['confidence']);
6464
foreach ($alternative['words'] as $wordInfo) {

0 commit comments

Comments
 (0)