Skip to content

Commit 8431d8a

Browse files
kurtisvgchingor13
authored andcommitted
samples: Updated mlengine, monitoring, pubsub, spanner, and speech. (#993)
* Updated mlengine/online-prediction. * Updated monitoring/ * Updated pubsub/ * Updated spanner/ * Updated speech/ * Fixed spanner mistakes.
1 parent aa531df commit 8431d8a

File tree

4 files changed

+58
-60
lines changed

4 files changed

+58
-60
lines changed

speech/snippets/src/main/java/com/example/speech/QuickstartSample.java

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
/*
2-
Copyright 2017, Google Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2017 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.speech;
1818

1919
// [START speech_quickstart]
2020
// Imports the Google Cloud client library
21+
2122
import com.google.cloud.speech.v1.RecognitionAudio;
2223
import com.google.cloud.speech.v1.RecognitionConfig;
2324
import com.google.cloud.speech.v1.RecognitionConfig.AudioEncoding;
@@ -26,7 +27,6 @@
2627
import com.google.cloud.speech.v1.SpeechRecognitionAlternative;
2728
import com.google.cloud.speech.v1.SpeechRecognitionResult;
2829
import com.google.protobuf.ByteString;
29-
3030
import java.nio.file.Files;
3131
import java.nio.file.Path;
3232
import java.nio.file.Paths;

speech/snippets/src/main/java/com/example/speech/Recognize.java

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
/*
2-
Copyright 2017, Google Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2017 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.speech;
1818

19+
import com.google.api.gax.longrunning.OperationFuture;
1920
import com.google.api.gax.rpc.ApiStreamObserver;
2021
import com.google.api.gax.rpc.BidiStreamingCallable;
21-
import com.google.api.gax.longrunning.OperationFuture;
2222
import com.google.cloud.speech.v1.LongRunningRecognizeMetadata;
2323
import com.google.cloud.speech.v1.LongRunningRecognizeResponse;
2424
import com.google.cloud.speech.v1.RecognitionAudio;

speech/snippets/src/test/java/com/example/speech/QuickstartSampleIT.java

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
/*
2-
Copyright 2017, Google, Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2017 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.speech;
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020

2121
import java.io.ByteArrayOutputStream;
2222
import java.io.PrintStream;
23-
2423
import org.junit.After;
2524
import org.junit.Before;
2625
import org.junit.Test;

speech/snippets/src/test/java/com/example/speech/RecognizeIT.java

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
/*
2-
Copyright 2017, Google, Inc.
3-
4-
Licensed under the Apache License, Version 2.0 (the "License");
5-
you may not use this file except in compliance with the License.
6-
You may obtain a copy of the License at
7-
8-
http://www.apache.org/licenses/LICENSE-2.0
9-
10-
Unless required by applicable law or agreed to in writing, software
11-
distributed under the License is distributed on an "AS IS" BASIS,
12-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
See the License for the specific language governing permissions and
14-
limitations under the License.
15-
*/
2+
* Copyright 2017 Google Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616

1717
package com.example.speech;
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020

2121
import java.io.ByteArrayOutputStream;
2222
import java.io.PrintStream;
23-
2423
import org.junit.After;
2524
import org.junit.Before;
2625
import org.junit.Test;

0 commit comments

Comments
 (0)