-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
21 changed files
with
2,542 additions
and
0 deletions.
There are no files selected for viewing
1,646 changes: 1,646 additions & 0 deletions
1,646
speech/generated_samples/snippet_metadata_speech_v1.json
Large diffs are not rendered by default.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for CreateCustomClass | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-speech | ||
|
||
|
||
# [START speech_v1_generated_Adaptation_CreateCustomClass_async] | ||
from google.cloud import speech_v1 | ||
|
||
|
||
async def sample_create_custom_class(): | ||
# Create a client | ||
client = speech_v1.AdaptationAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = speech_v1.CreateCustomClassRequest( | ||
parent="parent_value", | ||
custom_class_id="custom_class_id_value", | ||
) | ||
|
||
# Make the request | ||
response = await client.create_custom_class(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END speech_v1_generated_Adaptation_CreateCustomClass_async] |
46 changes: 46 additions & 0 deletions
46
speech/generated_samples/speech_v1_generated_adaptation_create_custom_class_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for CreateCustomClass | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-speech | ||
|
||
|
||
# [START speech_v1_generated_Adaptation_CreateCustomClass_sync] | ||
from google.cloud import speech_v1 | ||
|
||
|
||
def sample_create_custom_class(): | ||
# Create a client | ||
client = speech_v1.AdaptationClient() | ||
|
||
# Initialize request argument(s) | ||
request = speech_v1.CreateCustomClassRequest( | ||
parent="parent_value", | ||
custom_class_id="custom_class_id_value", | ||
) | ||
|
||
# Make the request | ||
response = client.create_custom_class(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END speech_v1_generated_Adaptation_CreateCustomClass_sync] |
46 changes: 46 additions & 0 deletions
46
speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for CreatePhraseSet | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-speech | ||
|
||
|
||
# [START speech_v1_generated_Adaptation_CreatePhraseSet_async] | ||
from google.cloud import speech_v1 | ||
|
||
|
||
async def sample_create_phrase_set(): | ||
# Create a client | ||
client = speech_v1.AdaptationAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = speech_v1.CreatePhraseSetRequest( | ||
parent="parent_value", | ||
phrase_set_id="phrase_set_id_value", | ||
) | ||
|
||
# Make the request | ||
response = await client.create_phrase_set(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END speech_v1_generated_Adaptation_CreatePhraseSet_async] |
46 changes: 46 additions & 0 deletions
46
speech/generated_samples/speech_v1_generated_adaptation_create_phrase_set_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for CreatePhraseSet | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-speech | ||
|
||
|
||
# [START speech_v1_generated_Adaptation_CreatePhraseSet_sync] | ||
from google.cloud import speech_v1 | ||
|
||
|
||
def sample_create_phrase_set(): | ||
# Create a client | ||
client = speech_v1.AdaptationClient() | ||
|
||
# Initialize request argument(s) | ||
request = speech_v1.CreatePhraseSetRequest( | ||
parent="parent_value", | ||
phrase_set_id="phrase_set_id_value", | ||
) | ||
|
||
# Make the request | ||
response = client.create_phrase_set(request=request) | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END speech_v1_generated_Adaptation_CreatePhraseSet_sync] |
43 changes: 43 additions & 0 deletions
43
speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for DeleteCustomClass | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-speech | ||
|
||
|
||
# [START speech_v1_generated_Adaptation_DeleteCustomClass_async] | ||
from google.cloud import speech_v1 | ||
|
||
|
||
async def sample_delete_custom_class(): | ||
# Create a client | ||
client = speech_v1.AdaptationAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = speech_v1.DeleteCustomClassRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
await client.delete_custom_class(request=request) | ||
|
||
|
||
# [END speech_v1_generated_Adaptation_DeleteCustomClass_async] |
43 changes: 43 additions & 0 deletions
43
speech/generated_samples/speech_v1_generated_adaptation_delete_custom_class_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for DeleteCustomClass | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-speech | ||
|
||
|
||
# [START speech_v1_generated_Adaptation_DeleteCustomClass_sync] | ||
from google.cloud import speech_v1 | ||
|
||
|
||
def sample_delete_custom_class(): | ||
# Create a client | ||
client = speech_v1.AdaptationClient() | ||
|
||
# Initialize request argument(s) | ||
request = speech_v1.DeleteCustomClassRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
client.delete_custom_class(request=request) | ||
|
||
|
||
# [END speech_v1_generated_Adaptation_DeleteCustomClass_sync] |
43 changes: 43 additions & 0 deletions
43
speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for DeletePhraseSet | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-speech | ||
|
||
|
||
# [START speech_v1_generated_Adaptation_DeletePhraseSet_async] | ||
from google.cloud import speech_v1 | ||
|
||
|
||
async def sample_delete_phrase_set(): | ||
# Create a client | ||
client = speech_v1.AdaptationAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = speech_v1.DeletePhraseSetRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
await client.delete_phrase_set(request=request) | ||
|
||
|
||
# [END speech_v1_generated_Adaptation_DeletePhraseSet_async] |
43 changes: 43 additions & 0 deletions
43
speech/generated_samples/speech_v1_generated_adaptation_delete_phrase_set_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2022 Google LLC | ||
# | ||
# 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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for DeletePhraseSet | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-speech | ||
|
||
|
||
# [START speech_v1_generated_Adaptation_DeletePhraseSet_sync] | ||
from google.cloud import speech_v1 | ||
|
||
|
||
def sample_delete_phrase_set(): | ||
# Create a client | ||
client = speech_v1.AdaptationClient() | ||
|
||
# Initialize request argument(s) | ||
request = speech_v1.DeletePhraseSetRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
client.delete_phrase_set(request=request) | ||
|
||
|
||
# [END speech_v1_generated_Adaptation_DeletePhraseSet_sync] |
Oops, something went wrong.