Skip to content

Commit faae901

Browse files
gcf-owl-bot[bot]telpirion
authored andcommitted
feat: Add adaptation proto for v1 api (#371)
* feat: Add adaptation proto for v1 api PiperOrigin-RevId: 447561222 Source-Link: googleapis/googleapis@ec9193e Source-Link: googleapis/googleapis-gen@cd279b0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2QyNzliMDAzZTQ0NTVjOWI4MDVmMjJmYzNiOTk3NmFkODYzOWVlNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent cde1dbb commit faae901

21 files changed

+2542
-0
lines changed

speech/generated_samples/snippet_metadata_speech_v1.json

Lines changed: 1646 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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+
# 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+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateCustomClass
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-speech
24+
25+
26+
# [START speech_v1_generated_Adaptation_CreateCustomClass_async]
27+
from google.cloud import speech_v1
28+
29+
30+
async def sample_create_custom_class():
31+
# Create a client
32+
client = speech_v1.AdaptationAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = speech_v1.CreateCustomClassRequest(
36+
parent="parent_value",
37+
custom_class_id="custom_class_id_value",
38+
)
39+
40+
# Make the request
41+
response = await client.create_custom_class(request=request)
42+
43+
# Handle the response
44+
print(response)
45+
46+
# [END speech_v1_generated_Adaptation_CreateCustomClass_async]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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+
# 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+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateCustomClass
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-speech
24+
25+
26+
# [START speech_v1_generated_Adaptation_CreateCustomClass_sync]
27+
from google.cloud import speech_v1
28+
29+
30+
def sample_create_custom_class():
31+
# Create a client
32+
client = speech_v1.AdaptationClient()
33+
34+
# Initialize request argument(s)
35+
request = speech_v1.CreateCustomClassRequest(
36+
parent="parent_value",
37+
custom_class_id="custom_class_id_value",
38+
)
39+
40+
# Make the request
41+
response = client.create_custom_class(request=request)
42+
43+
# Handle the response
44+
print(response)
45+
46+
# [END speech_v1_generated_Adaptation_CreateCustomClass_sync]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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+
# 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+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreatePhraseSet
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-speech
24+
25+
26+
# [START speech_v1_generated_Adaptation_CreatePhraseSet_async]
27+
from google.cloud import speech_v1
28+
29+
30+
async def sample_create_phrase_set():
31+
# Create a client
32+
client = speech_v1.AdaptationAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = speech_v1.CreatePhraseSetRequest(
36+
parent="parent_value",
37+
phrase_set_id="phrase_set_id_value",
38+
)
39+
40+
# Make the request
41+
response = await client.create_phrase_set(request=request)
42+
43+
# Handle the response
44+
print(response)
45+
46+
# [END speech_v1_generated_Adaptation_CreatePhraseSet_async]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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+
# 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+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreatePhraseSet
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-speech
24+
25+
26+
# [START speech_v1_generated_Adaptation_CreatePhraseSet_sync]
27+
from google.cloud import speech_v1
28+
29+
30+
def sample_create_phrase_set():
31+
# Create a client
32+
client = speech_v1.AdaptationClient()
33+
34+
# Initialize request argument(s)
35+
request = speech_v1.CreatePhraseSetRequest(
36+
parent="parent_value",
37+
phrase_set_id="phrase_set_id_value",
38+
)
39+
40+
# Make the request
41+
response = client.create_phrase_set(request=request)
42+
43+
# Handle the response
44+
print(response)
45+
46+
# [END speech_v1_generated_Adaptation_CreatePhraseSet_sync]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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+
# 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+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeleteCustomClass
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-speech
24+
25+
26+
# [START speech_v1_generated_Adaptation_DeleteCustomClass_async]
27+
from google.cloud import speech_v1
28+
29+
30+
async def sample_delete_custom_class():
31+
# Create a client
32+
client = speech_v1.AdaptationAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = speech_v1.DeleteCustomClassRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
await client.delete_custom_class(request=request)
41+
42+
43+
# [END speech_v1_generated_Adaptation_DeleteCustomClass_async]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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+
# 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+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeleteCustomClass
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-speech
24+
25+
26+
# [START speech_v1_generated_Adaptation_DeleteCustomClass_sync]
27+
from google.cloud import speech_v1
28+
29+
30+
def sample_delete_custom_class():
31+
# Create a client
32+
client = speech_v1.AdaptationClient()
33+
34+
# Initialize request argument(s)
35+
request = speech_v1.DeleteCustomClassRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
client.delete_custom_class(request=request)
41+
42+
43+
# [END speech_v1_generated_Adaptation_DeleteCustomClass_sync]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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+
# 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+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeletePhraseSet
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-speech
24+
25+
26+
# [START speech_v1_generated_Adaptation_DeletePhraseSet_async]
27+
from google.cloud import speech_v1
28+
29+
30+
async def sample_delete_phrase_set():
31+
# Create a client
32+
client = speech_v1.AdaptationAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = speech_v1.DeletePhraseSetRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
await client.delete_phrase_set(request=request)
41+
42+
43+
# [END speech_v1_generated_Adaptation_DeletePhraseSet_async]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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+
# 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+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeletePhraseSet
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-speech
24+
25+
26+
# [START speech_v1_generated_Adaptation_DeletePhraseSet_sync]
27+
from google.cloud import speech_v1
28+
29+
30+
def sample_delete_phrase_set():
31+
# Create a client
32+
client = speech_v1.AdaptationClient()
33+
34+
# Initialize request argument(s)
35+
request = speech_v1.DeletePhraseSetRequest(
36+
name="name_value",
37+
)
38+
39+
# Make the request
40+
client.delete_phrase_set(request=request)
41+
42+
43+
# [END speech_v1_generated_Adaptation_DeletePhraseSet_sync]

0 commit comments

Comments
 (0)