From 42cb719467644afb207a50799e80aabbc178338b Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Thu, 16 Aug 2018 15:57:42 -0700 Subject: [PATCH 01/13] update beta tags --- .../src/main/java/com/example/speech/Recognize.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 15beaba3e1a..0dd5d0a7d72 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -586,7 +586,7 @@ public static void transcribeFileWithAutomaticPunctuation(String fileName) throw } // [END speech_sync_recognize_punctuation] - // [START speech_async_recognize_gcs_punctuation] + // [START speech_transcribe_auto_punctuation_beta] /** * Performs transcription on remote FLAC file and prints the transcription. * @@ -626,7 +626,7 @@ public static void transcribeGcsWithAutomaticPunctuation(String gcsUri) throws E System.out.printf("Transcript : %s\n", alternative.getTranscript()); } } - // [END speech_async_recognize_gcs_punctuation] + // [END speech_transcribe_auto_punctuation_beta] // [START speech_stream_recognize_punctuation] /** @@ -808,7 +808,7 @@ public void onError(Throwable t) { } // [END speech_streaming_mic_recognize] - // [START speech_transcribe_file_with_enhanced_model] + // [START speech_transcribe_enhanced_model_beta] /** * Transcribe the given audio file using an enhanced model. * @@ -848,7 +848,7 @@ public static void transcribeFileWithEnhancedModel(String fileName) throws Excep } } } - // [END speech_transcribe_file_with_enhanced_model] + // [END speech_transcribe_enhanced_model_beta] // [START speech_transcribe_file_with_metadata] /** From 9437c7fa91e27249c75c02d4b25a04dab51802fe Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Thu, 16 Aug 2018 16:06:36 -0700 Subject: [PATCH 02/13] updates tags for recognition-metadata page --- .../src/main/java/com/example/speech/Recognize.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 0dd5d0a7d72..77f549bb0ff 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -850,7 +850,7 @@ public static void transcribeFileWithEnhancedModel(String fileName) throws Excep } // [END speech_transcribe_enhanced_model_beta] - // [START speech_transcribe_file_with_metadata] + // [START speech_transcribe_recognition_metadata_beta] /** * Transcribe the given audio file and include recognition metadata in the request. * @@ -900,7 +900,7 @@ public static void transcribeFileWithMetadata(String fileName) throws Exception } } } - // [END speech_transcribe_file_with_metadata] + // [END speech_transcribe_recognition_metadata_beta] // [START speech_transcribe_diarization] /** From 3f82809fb54e5260946845dd30d7416874e28ef1 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Thu, 16 Aug 2018 16:13:13 -0700 Subject: [PATCH 03/13] update diarization tag to beta --- .../src/main/java/com/example/speech/Recognize.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 77f549bb0ff..ec200e24211 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -902,7 +902,7 @@ public static void transcribeFileWithMetadata(String fileName) throws Exception } // [END speech_transcribe_recognition_metadata_beta] - // [START speech_transcribe_diarization] + // [START speech_transcribe_diarization_beta] /** * Transcribe the given audio file using speaker diarization. * @@ -945,9 +945,9 @@ public static void transcribeDiarization(String fileName) throws Exception { } } } - // [END speech_transcribe_diarization] + // [END speech_transcribe_diarization_beta] - // [START speech_transcribe_diarization_gcs] + // [START speech_transcribe_diarization_gcs_beta] /** * Transcribe a remote audio file using speaker diarization. * @@ -991,7 +991,7 @@ public static void transcribeDiarizationGcs(String gcsUri) throws Exception { } } - // [END speech_transcribe_diarization_gcs] + // [END speech_transcribe_diarization_gcs_beta] // [START speech_transcribe_multichannel] From 0b64db7eaecc87ea70a95e5d3a56e5b2d54afbc5 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Thu, 16 Aug 2018 16:23:05 -0700 Subject: [PATCH 04/13] update word level confidence tags to beta --- .../src/main/java/com/example/speech/Recognize.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index ec200e24211..6860aa8bb93 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -1171,7 +1171,7 @@ public static void transcribeMultiLanguageGcs(String gcsUri) throws Exception { } // [END speech_transcribe_multilang_gcs] - // [START speech_transcribe_word_level_confidence] + // [START speech_transcribe_word_level_confidence_beta] /** * Transcribe a local audio file with word level confidence @@ -1208,9 +1208,9 @@ public static void transcribeWordLevelConfidence(String fileName) throws Excepti } } } - // [END speech_transcribe_word_level_confidence] + // [END speech_transcribe_word_level_confidence_beta] - // [START speech_transcribe_word_level_confidence_gcs] + // [START speech_transcribe_word_level_confidence_gcs_beta] /** * Transcribe a remote audio file with word level confidence @@ -1253,5 +1253,5 @@ public static void transcribeWordLevelConfidenceGcs(String gcsUri) throws Except alternative.getWords(0).getWord(), alternative.getWords(0).getConfidence()); } } - // [END speech_transcribe_word_level_confidence_gcs] + // [END speech_transcribe_word_level_confidence_gcs_beta] } From 27f1219e988478e0a52dcf41abd49b84ae43e23f Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Thu, 16 Aug 2018 17:17:39 -0700 Subject: [PATCH 05/13] adds region tags for async-recognize page --- .../src/main/java/com/example/speech/Recognize.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 6860aa8bb93..bec22847bb9 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -343,6 +343,7 @@ public static void asyncRecognizeWords(String gcsUri) throws Exception { } } + // [START speech_transcribe_async_gcs] /** * Performs non-blocking speech recognition on remote FLAC file and prints the transcription. * @@ -379,6 +380,7 @@ public static void asyncRecognizeGcs(String gcsUri) throws Exception { } } } + // [END speech_transcribe_async_gcs] /** * Performs streaming speech recognition on raw PCM audio data. From 59b2ec7c4f73ebb2a91fc88ad4aa5180fade418e Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Fri, 17 Aug 2018 09:11:13 -0700 Subject: [PATCH 06/13] updates region tag for async-time-offsets --- .../src/main/java/com/example/speech/Recognize.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index bec22847bb9..e3c5e079278 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -295,6 +295,7 @@ public static void asyncRecognizeFile(String fileName) throws Exception { } } + // [START speech_transcribe_async_time_offsets_gcs] /** * Performs non-blocking speech recognition on remote FLAC file and prints the transcription as * well as word time offsets. @@ -342,6 +343,7 @@ public static void asyncRecognizeWords(String gcsUri) throws Exception { } } } + // [END speech_transcribe_async_time_offsets_gcs] // [START speech_transcribe_async_gcs] /** From 73e4854fd50a4f2afba9d9befad857b421bc8292 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Fri, 17 Aug 2018 10:01:48 -0700 Subject: [PATCH 07/13] update region tags for sync transcribe --- .../src/main/java/com/example/speech/Recognize.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index e3c5e079278..609063f34c7 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -146,6 +146,7 @@ public static void main(String... args) throws Exception { } } + // [START speech_transcribe_sync] /** * Performs speech recognition on raw PCM audio and prints the transcription. * @@ -178,6 +179,7 @@ public static void syncRecognizeFile(String fileName) throws Exception { } } } + // [END speech_transcribe_sync] /** * Performs sync recognize and prints word time offsets. @@ -222,6 +224,7 @@ public static void syncRecognizeWords(String fileName) throws Exception { } } + // [START speech_transcribe_sync_gcs] /** * Performs speech recognition on remote FLAC file and prints the transcription. * @@ -251,6 +254,7 @@ public static void syncRecognizeGcs(String gcsUri) throws Exception { } } } + // [END speech_transcribe_sync_gcs] /** * Performs non-blocking speech recognition on raw PCM audio and prints the transcription. Note From 173f51774507a5984b5f550145d5957159fb2d97 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Fri, 17 Aug 2018 10:09:09 -0700 Subject: [PATCH 08/13] updates multichannel tags to beta --- .../src/main/java/com/example/speech/Recognize.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 609063f34c7..7c6aab8ccd2 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -1001,7 +1001,7 @@ public static void transcribeDiarizationGcs(String gcsUri) throws Exception { // [END speech_transcribe_diarization_gcs_beta] - // [START speech_transcribe_multichannel] + // [START speech_transcribe_multichannel_beta] /** * Transcribe a local audio file with multi-channel recognition @@ -1040,9 +1040,9 @@ public static void transcribeMultiChannel(String fileName) throws Exception { } } } - // [END speech_transcribe_multichannel] + // [END speech_transcribe_multichannel_beta] - // [START speech_transcribe_multichannel_gcs] + // [START speech_transcribe_multichannel_gcs_beta] /** * Transcribe a remote audio file with multi-channel recognition @@ -1087,7 +1087,7 @@ public static void transcribeMultiChannelGcs(String gcsUri) throws Exception { } } } - // [END speech_transcribe_multichannel_gcs] + // [END speech_transcribe_multichannel_gcs_beta] // [START speech_transcribe_multilang] From df9c8b0e14a7109a36e0d9a4b5739aae12b03756 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Fri, 17 Aug 2018 10:15:57 -0700 Subject: [PATCH 09/13] updates multilanguage tags to beta --- .../src/main/java/com/example/speech/Recognize.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 7c6aab8ccd2..15e885b1913 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -1089,7 +1089,7 @@ public static void transcribeMultiChannelGcs(String gcsUri) throws Exception { } // [END speech_transcribe_multichannel_gcs_beta] - // [START speech_transcribe_multilang] + // [START speech_transcribe_multilanguage_beta] /** * Transcribe a local audio file with multi-language recognition @@ -1129,9 +1129,9 @@ public static void transcribeMultiLanguage(String fileName) throws Exception { } } } - // [END speech_transcribe_multilang] + // [END speech_transcribe_multilanguage_beta] - // [START speech_transcribe_multilang_gcs] + // [START speech_transcribe_multilanguage_gcs_beta] /** * Transcribe a remote audio file with multi-language recognition @@ -1177,7 +1177,7 @@ public static void transcribeMultiLanguageGcs(String gcsUri) throws Exception { } } } - // [END speech_transcribe_multilang_gcs] + // [END speech_transcribe_multilanguage_gcs_beta] // [START speech_transcribe_word_level_confidence_beta] From 3e93c8383a771c5cefcc85d9f8c83b150f0f5b58 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Fri, 17 Aug 2018 12:39:03 -0700 Subject: [PATCH 10/13] update streaming region tags --- .../src/main/java/com/example/speech/Recognize.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 15e885b1913..18a63190586 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -388,6 +388,7 @@ public static void asyncRecognizeGcs(String gcsUri) throws Exception { } // [END speech_transcribe_async_gcs] + // [START speech_transcribe_streaming] /** * Performs streaming speech recognition on raw PCM audio data. * @@ -472,6 +473,7 @@ public SettableFuture> future() { } } } + // [END speech_transcribe_streaming] // [START speech_transcribe_model_selection] /** @@ -725,7 +727,7 @@ public SettableFuture> future() { } // [END speech_stream_recognize_punctuation] - // [START speech_streaming_mic_recognize] + // [START speech_transcribe_streaming_mic] /** Performs microphone streaming speech recognition with a duration of 1 minute. */ public static void streamingMicRecognize() throws Exception { @@ -814,7 +816,7 @@ public void onError(Throwable t) { } responseObserver.onComplete(); } - // [END speech_streaming_mic_recognize] + // [END speech_transcribe_streaming_mic] // [START speech_transcribe_enhanced_model_beta] /** From 4926b98b96a763b67bb659ba957c952912713636 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Fri, 17 Aug 2018 12:44:31 -0700 Subject: [PATCH 11/13] change model selection tags to beta --- .../src/main/java/com/example/speech/Recognize.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 18a63190586..31463e8448c 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -475,7 +475,7 @@ public SettableFuture> future() { } // [END speech_transcribe_streaming] - // [START speech_transcribe_model_selection] + // [START speech_transcribe_model_selection_beta] /** * Performs transcription of the given audio file synchronously with the selected model. * @@ -509,10 +509,10 @@ public static void transcribeModelSelection(String fileName) throws Exception { SpeechRecognitionAlternative alternative = result.getAlternativesList().get(0); System.out.printf("Transcript : %s\n", alternative.getTranscript()); } - // [END speech_transcribe_model_selection] + // [END speech_transcribe_model_selection_beta] } - // [START speech_transcribe_model_selection_gcs] + // [START speech_transcribe_model_selection_gcs_beta] /** * Performs transcription of the remote audio file asynchronously with the selected model. * @@ -553,7 +553,7 @@ public static void transcribeModelSelectionGcs(String gcsUri) throws Exception { SpeechRecognitionAlternative alternative = result.getAlternativesList().get(0); System.out.printf("Transcript : %s\n", alternative.getTranscript()); } - // [END speech_transcribe_model_selection_gcs] + // [END speech_transcribe_model_selection_gcs_beta] } // [START speech_sync_recognize_punctuation] From a7cccfcc69a7a5cd4b08dc2f3df574334ac6192e Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Fri, 17 Aug 2018 12:59:15 -0700 Subject: [PATCH 12/13] update speech quickstart dependencies tag --- speech/cloud-client/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/speech/cloud-client/pom.xml b/speech/cloud-client/pom.xml index 45d2ae8a701..68cd05bd13b 100644 --- a/speech/cloud-client/pom.xml +++ b/speech/cloud-client/pom.xml @@ -36,13 +36,13 @@ - + com.google.cloud google-cloud-speech 0.56.0-beta - + From 269635bbd8ed11d91d4d3d7fa910733e9c795efe Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Fri, 17 Aug 2018 13:26:44 -0700 Subject: [PATCH 13/13] adds async local tags --- .../src/main/java/com/example/speech/Recognize.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java index 31463e8448c..69754771f5d 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/Recognize.java +++ b/speech/cloud-client/src/main/java/com/example/speech/Recognize.java @@ -256,6 +256,7 @@ public static void syncRecognizeGcs(String gcsUri) throws Exception { } // [END speech_transcribe_sync_gcs] + // [START speech_transcribe_async] /** * Performs non-blocking speech recognition on raw PCM audio and prints the transcription. Note * that transcription is limited to 60 seconds audio. @@ -298,6 +299,7 @@ public static void asyncRecognizeFile(String fileName) throws Exception { } } } + // [END speech_transcribe_async] // [START speech_transcribe_async_time_offsets_gcs] /**