From c894cdd8306ba221957f32fd54fe1de5df51a966 Mon Sep 17 00:00:00 2001 From: Noah Negrey Date: Wed, 21 Feb 2018 15:45:16 -0800 Subject: [PATCH] Update based on style guidelines --- .../com/example/speech/QuickstartSample.java | 30 ++++++++--------- .../java/com/example/speech/Recognize.java | 32 +++++++++---------- .../example/speech/QuickstartSampleIT.java | 28 ++++++++-------- .../java/com/example/speech/RecognizeIT.java | 28 ++++++++-------- 4 files changed, 59 insertions(+), 59 deletions(-) diff --git a/speech/cloud-client/src/main/java/com/example/speech/QuickstartSample.java b/speech/cloud-client/src/main/java/com/example/speech/QuickstartSample.java index 10e6a1c05b4..f47497e2c1f 100644 --- a/speech/cloud-client/src/main/java/com/example/speech/QuickstartSample.java +++ b/speech/cloud-client/src/main/java/com/example/speech/QuickstartSample.java @@ -1,28 +1,28 @@ /* - Copyright 2018, Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.speech; // [START speech_quickstart] // Imports the Google Cloud client library -import com.google.cloud.speech.v1p1beta1.SpeechClient; import com.google.cloud.speech.v1p1beta1.RecognitionAudio; import com.google.cloud.speech.v1p1beta1.RecognitionConfig; import com.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding; import com.google.cloud.speech.v1p1beta1.RecognizeResponse; +import com.google.cloud.speech.v1p1beta1.SpeechClient; import com.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative; import com.google.cloud.speech.v1p1beta1.SpeechRecognitionResult; import com.google.protobuf.ByteString; 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 5b26dba15d2..1976be3c98f 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 @@ -1,31 +1,31 @@ /* - Copyright 2018, Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.speech; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.rpc.ApiStreamObserver; import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.cloud.speech.v1p1beta1.SpeechClient; import com.google.cloud.speech.v1p1beta1.LongRunningRecognizeMetadata; import com.google.cloud.speech.v1p1beta1.LongRunningRecognizeResponse; import com.google.cloud.speech.v1p1beta1.RecognitionAudio; import com.google.cloud.speech.v1p1beta1.RecognitionConfig; import com.google.cloud.speech.v1p1beta1.RecognitionConfig.AudioEncoding; import com.google.cloud.speech.v1p1beta1.RecognizeResponse; +import com.google.cloud.speech.v1p1beta1.SpeechClient; import com.google.cloud.speech.v1p1beta1.SpeechRecognitionAlternative; import com.google.cloud.speech.v1p1beta1.SpeechRecognitionResult; import com.google.cloud.speech.v1p1beta1.StreamingRecognitionConfig; @@ -448,7 +448,7 @@ public static void transcribeVideoFile(String fileName) throws Exception { // There can be several alternative transcripts for a given chunk of speech. Just use the // first (most likely) one here. SpeechRecognitionAlternative alternative = result.getAlternativesList().get(0); - System.out.printf("Transcript : %s\n", alternative.getTranscript()); + System.out.printf("Transcript : %s\n", alternative.getTranscript()); } // [END speech_transcribe_model_selection] } diff --git a/speech/cloud-client/src/test/java/com/example/speech/QuickstartSampleIT.java b/speech/cloud-client/src/test/java/com/example/speech/QuickstartSampleIT.java index a755feba613..22be282b8e1 100644 --- a/speech/cloud-client/src/test/java/com/example/speech/QuickstartSampleIT.java +++ b/speech/cloud-client/src/test/java/com/example/speech/QuickstartSampleIT.java @@ -1,18 +1,18 @@ /* - Copyright 2018, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.speech; diff --git a/speech/cloud-client/src/test/java/com/example/speech/RecognizeIT.java b/speech/cloud-client/src/test/java/com/example/speech/RecognizeIT.java index 08434dbd66b..2970647a010 100644 --- a/speech/cloud-client/src/test/java/com/example/speech/RecognizeIT.java +++ b/speech/cloud-client/src/test/java/com/example/speech/RecognizeIT.java @@ -1,18 +1,18 @@ /* - Copyright 2018, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2018 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.speech;