Skip to content

Commit 63eae5b

Browse files
yoshi-automationsduskis
authored andcommitted
---
yaml --- r: 13607 b: refs/heads/autosynth-dlp c: 7de46b4 h: refs/heads/master i: 13605: 5a6c59d 13603: 5e3dd79 13599: 1643d34
1 parent 547e6a9 commit 63eae5b

4 files changed

Lines changed: 165 additions & 14 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ refs/tags/v0.60.0: 4cd518d0612329f8a8e53484eef4cd1651e32855
104104
refs/tags/v0.61.0: e4b526656bb1bf5eefd0ee578b7405147821225e
105105
refs/tags/v0.62.0: bbede7385d48ba08f487bdd29ec10668ace96396
106106
refs/heads/0.60.0-alpha: 10939381ffe0b8da32db4fe3087c86e3aa7f3e55
107-
refs/heads/autosynth-dlp: 5adffe8b96186c78663fa231fb1bff8692adf6ff
107+
refs/heads/autosynth-dlp: 7de46b4ce194f4c7d7094dd1d7dec4f4a85ad363
108108
refs/heads/autosynth-logging: f8794c50a64f62b167cddf42513d133547679e01
109109
refs/heads/dupes: 3478c5d81fd242d0e985656645a679420a2060c2
110110
refs/tags/v0.63.0: 94f19b71d40f46b36120e7b9d78a1a3d41bfcbd6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright 2018 Google LLC
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+
* https://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+
*/
16+
package com.google.cloud.texttospeech.v1;
17+
18+
import com.google.common.base.Preconditions;
19+
import java.util.logging.Level;
20+
import java.util.logging.Logger;
21+
import org.junit.Test;
22+
23+
@javax.annotation.Generated("by GAPIC")
24+
public class TextToSpeechSmokeTest {
25+
private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT";
26+
private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT";
27+
28+
@Test
29+
public void run() {
30+
main(null);
31+
}
32+
33+
public static void main(String args[]) {
34+
Logger.getLogger("").setLevel(Level.WARNING);
35+
try {
36+
executeNoCatch();
37+
System.out.println("OK");
38+
} catch (Exception e) {
39+
System.err.println("Failed with exception:");
40+
e.printStackTrace(System.err);
41+
System.exit(1);
42+
}
43+
}
44+
45+
public static void executeNoCatch() throws Exception {
46+
try (TextToSpeechClient client = TextToSpeechClient.create()) {
47+
String text = "test";
48+
SynthesisInput input = SynthesisInput.newBuilder().setText(text).build();
49+
String languageCode = "en-US";
50+
VoiceSelectionParams voice =
51+
VoiceSelectionParams.newBuilder().setLanguageCode(languageCode).build();
52+
AudioEncoding audioEncoding = AudioEncoding.MP3;
53+
AudioConfig audioConfig = AudioConfig.newBuilder().setAudioEncoding(audioEncoding).build();
54+
55+
SynthesizeSpeechResponse response = client.synthesizeSpeech(input, voice, audioConfig);
56+
}
57+
}
58+
59+
private static String getProjectId() {
60+
String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME));
61+
if (projectId == null) {
62+
projectId =
63+
System.getProperty(LEGACY_PROJECT_ENV_NAME, System.getenv(LEGACY_PROJECT_ENV_NAME));
64+
}
65+
Preconditions.checkArgument(projectId != null, "A project ID is required.");
66+
return projectId;
67+
}
68+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright 2018 Google LLC
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+
* https://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+
*/
16+
package com.google.cloud.texttospeech.v1beta1;
17+
18+
import com.google.common.base.Preconditions;
19+
import java.util.logging.Level;
20+
import java.util.logging.Logger;
21+
import org.junit.Test;
22+
23+
@javax.annotation.Generated("by GAPIC")
24+
public class TextToSpeechSmokeTest {
25+
private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT";
26+
private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT";
27+
28+
@Test
29+
public void run() {
30+
main(null);
31+
}
32+
33+
public static void main(String args[]) {
34+
Logger.getLogger("").setLevel(Level.WARNING);
35+
try {
36+
executeNoCatch();
37+
System.out.println("OK");
38+
} catch (Exception e) {
39+
System.err.println("Failed with exception:");
40+
e.printStackTrace(System.err);
41+
System.exit(1);
42+
}
43+
}
44+
45+
public static void executeNoCatch() throws Exception {
46+
try (TextToSpeechClient client = TextToSpeechClient.create()) {
47+
String text = "test";
48+
SynthesisInput input = SynthesisInput.newBuilder().setText(text).build();
49+
String languageCode = "en-US";
50+
VoiceSelectionParams voice =
51+
VoiceSelectionParams.newBuilder().setLanguageCode(languageCode).build();
52+
AudioEncoding audioEncoding = AudioEncoding.MP3;
53+
AudioConfig audioConfig = AudioConfig.newBuilder().setAudioEncoding(audioEncoding).build();
54+
55+
SynthesizeSpeechResponse response = client.synthesizeSpeech(input, voice, audioConfig);
56+
}
57+
}
58+
59+
private static String getProjectId() {
60+
String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME));
61+
if (projectId == null) {
62+
projectId =
63+
System.getProperty(LEGACY_PROJECT_ENV_NAME, System.getenv(LEGACY_PROJECT_ENV_NAME));
64+
}
65+
Preconditions.checkArgument(projectId != null, "A project ID is required.");
66+
return projectId;
67+
}
68+
}
Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
{
2+
"updateTime": "2019-01-12T08:51:17.352312Z",
23
"sources": [
4+
{
5+
"generator": {
6+
"name": "artman",
7+
"version": "0.16.5",
8+
"dockerImage": "googleapis/artman@sha256:5a96c2c5c6f9570cc9556b63dc9ce1838777fd9166b5b64e43ad8e0ecee2fe2c"
9+
}
10+
},
311
{
412
"git": {
513
"name": "googleapis",
614
"remote": "https://github.com/googleapis/googleapis.git",
7-
"sha": "5a57f0c13a358b2b15452bf2d67453774a5f6d4f",
8-
"internalRef": "221837528"
15+
"sha": "2156b3490f9fe4d79bcb34754a3aaed7ea52114d",
16+
"internalRef": "228970571"
917
}
10-
},
18+
}
19+
],
20+
"destinations": [
1121
{
12-
"git": {
13-
"name": "googleapis-private",
14-
"remote": "https://github.com/googleapis/googleapis-private.git",
15-
"sha": "6aa8e1a447bb8d0367150356a28cb4d3f2332641",
16-
"internalRef": "221340946"
22+
"client": {
23+
"source": "googleapis",
24+
"apiName": "texttospeech",
25+
"apiVersion": "v1",
26+
"language": "java",
27+
"generator": "gapic",
28+
"config": "google/cloud/texttospeech/artman_texttospeech_v1.yaml"
1729
}
1830
},
1931
{
20-
"generator": {
21-
"name": "artman",
22-
"version": "0.16.0",
23-
"dockerImage": "googleapis/artman@sha256:90f9d15e9bad675aeecd586725bce48f5667ffe7d5fc4d1e96d51ff34304815b"
32+
"client": {
33+
"source": "googleapis",
34+
"apiName": "texttospeech",
35+
"apiVersion": "v1beta1",
36+
"language": "java",
37+
"generator": "gapic",
38+
"config": "google/cloud/texttospeech/artman_texttospeech_v1beta1.yaml"
2439
}
2540
}
2641
]
27-
}
42+
}

0 commit comments

Comments
 (0)