Skip to content

Commit

Permalink
samples: Speech async examples (#612)
Browse files Browse the repository at this point in the history
* Adds async examples

* Adds link to Cloud Client.

* Changes sleep duration

* Adds GCS example.
  • Loading branch information
gguuss authored and chingor13 committed Aug 15, 2020
1 parent 667fb0f commit 5f2f0f0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public static void asyncRecognizeFile(String fileName) throws Exception, IOExcep
speech.longRunningRecognizeAsync(config, audio);
while (!response.isDone()) {
System.out.println("Waiting for response...");
Thread.sleep(200);
Thread.sleep(10000);
}

List<SpeechRecognitionResult> results = response.get().getResultsList();
Expand Down Expand Up @@ -211,7 +211,7 @@ public static void asyncRecognizeGcs(String gcsUri) throws Exception, IOExceptio
speech.longRunningRecognizeAsync(config, audio);
while (!response.isDone()) {
System.out.println("Waiting for response...");
Thread.sleep(200);
Thread.sleep(10000);
}

List<SpeechRecognitionResult> results = response.get().getResultsList();
Expand Down

0 comments on commit 5f2f0f0

Please sign in to comment.