Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

samples: adds samples to client library - #68

Merged
telpirion merged 9 commits into
masterfrom
samples
Jun 21, 2021
Merged

telpirion merged 9 commits into
masterfrom
samples

Conversation

@telpirion

Copy link
Copy Markdown
Contributor

This PR does the following:

@telpirion
telpirion requested a review from a team as a code owner June 17, 2021 23:26
@product-auto-label product-auto-label Bot added api: mediatranslation Issues related to the googleapis/python-media-translation API. samples Issues that are directly related to samples. labels Jun 17, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 17, 2021
@snippet-bot

snippet-bot Bot commented Jun 17, 2021 •

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Comment thread samples/translate_from_mic.py Outdated
Comment on lines +142 to +145
# The first request contains the configuration.
# Note that audio_content is explicitly set to None.
first_request = media.StreamingTranslateSpeechRequest(
streaming_config=config, audio_content=None)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any construction of a StreamingTranslateSpeechRequest that sets both streaming_config and audio_content is going to have problems. Either one or the other msut be set, but not both.

Comment thread samples/translate_from_mic.py Outdated
Comment on lines +150 to +151
audio_content=content,
streaming_config=config)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: it's an error to set both audio_content and streaming_config in the same request.

@telpirion
telpirion requested a review from software-dov June 21, 2021 17:28
@telpirion telpirion added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 21, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 21, 2021
@busunkim96

Copy link
Copy Markdown
Contributor

Thanks for moving these!

Please move the samples into sample/snippets and add python.py_samples() into the owlbot.py file to add the samples noxfile. (example). I'll send a CL to enable the samples checks on this repo.

@telpirion
telpirion requested a review from a team June 21, 2021 19:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: mediatranslation Issues related to the googleapis/python-media-translation API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants