Skip to content
This repository was archived by the owner on Dec 15, 2023. It is now read-only.

Commit 053e342

Browse files
authored
test: allow passing audio gcs uri env variable to Speech integration tests (#239)
1 parent 975fc26 commit 053e342

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

google-cloud-speech/src/test/java/com/google/cloud/speech/v1/it/ITSpeechTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ private RecognitionConfig config() {
148148
}
149149

150150
public RecognitionAudio audio() {
151+
String audio_gcs_uri = System.getenv("AUDIO_GCS_URI");
152+
if (audio_gcs_uri != null) {
153+
return RecognitionAudio.newBuilder().setUri(audio_gcs_uri).build();
154+
}
151155
return RecognitionAudio.newBuilder().setUri("gs://gapic-toolkit/hello.flac").build();
152156
}
153157
}

0 commit comments

Comments
 (0)