8000 docs(samples): add sample code for StreamingAnalyzeContent for live transcription. by rogers140 · Pull Request #575 · googleapis/python-dialogflow · GitHub
[go: up one dir, main page]

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

Conversation

rogers140
Copy link
Member
@rogers140 rogers140 commented Sep 26, 2022

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

@rogers140 rogers140 requested review from a team as code owners September 26, 2022 17:33
@rogers140 rogers140 requested a review from kurtisvg September 26, 2022 17:33
@conventional-commit-lint-gcf
Copy link
conventional-commit-lint-gcf bot commented Sep 26, 2022

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@snippet-bot
Copy link
snippet-bot bot commented Sep 26, 2022

Here is the summary of changes.

You are about to add 1 region tag.

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

@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: dialogflow Issues related to the googleapis/python-dialogflow API. samples Issues that are directly related to samples. labels Sep 26, 2022
Copy link
Contributor
@kurtisvg kurtisvg left a comment

Choose a reason for hiding this comment

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

Looks like a failing test:

args = (<generator object analyze_content_audio_stream.<locals>.request_generator at 0x7f5937e8aff0>,)
kwargs = {'metadata': [('x-goog-api-client', 'gl-python/3.10.5 grpc/1.49.1 gax/2.10.1 gapic/2.15.2')]}
result = <_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "While calling...hile calling Cloud Speech API: Invalid recognition \'config\': single_utterance=true not supported for this model."}"
>
prefetch_first = True

    @functools.wraps(callable_)
    def error_remapped_callable(*args, **kwargs):
        try:
            result = callable_(*args, **kwargs)
            # Auto-fetching the first result causes PubSub client's streaming pull
            # to hang when re-opening the stream, thus we need examine the hacky
            # hidden flag to see if pre-fetching is disabled.
            # https://github.com/googleapis/python-pubsub/issues/93#issuecomment-630762257
            prefetch_first = getattr(callable_, "_prefetch_first_result_", True)
>           return _StreamingResponseIterator(
                result, prefetch_first_result=prefetch_first
            )

.nox/py-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:162:

@rogers140
Copy link
Member Author

Looks like a failing test:

args = (<generator object analyze_content_audio_stream.<locals>.request_generator at 0x7f5937e8aff0>,)
kwargs = {'metadata': [('x-goog-api-client', 'gl-python/3.10.5 grpc/1.49.1 gax/2.10.1 gapic/2.15.2')]}
result = <_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.INVALID_ARGUMENT
	details = "While calling...hile calling Cloud Speech API: Invalid recognition \'config\': single_utterance=true not supported for this model."}"
>
prefetch_first = True

    @functools.wraps(callable_)
    def error_remapped_callable(*args, **kwargs):
        try:
            result = callable_(*args, **kwargs)
            # Auto-fetching the first result causes PubSub client's streaming pull
            # to hang when re-opening the stream, thus we need examine the hacky
            # hidden flag to see if pre-fetching is disabled.
            # https://github.com/googleapis/python-pubsub/issues/93#issuecomment-630762257
            prefetch_first = getattr(callable_, "_prefetch_first_result_", True)
>           return _StreamingResponseIterator(
                result, prefetch_first_result=prefetch_first
            )

.nox/py-3-10/lib/python3.10/site-packages/google/api_core/grpc_helpers.py:162:

It works when I executed locally. Do you know what is the environment project that the test in here uses?

Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>
@rogers140
Copy link
Member Author

I think the reason why it failed is due to python-docs-samples-tests is STANDARD_TIER for Dialoglflow ES, and we only allow ENTERPRISE_TIER to use ENHANCED speech model. I just updated the tier, details in b/249835006.

@rogers140 rogers140 requested review from dandhlee and kurtisvg and removed request for dandhlee and kurtisvg September 30, 2022 19:03
@rogers140 rogers140 requested a review from kurtisvg September 30, 2022 22:46
@parthea parthea changed the title Samples: add sample code for StreamingAnalyzeContent for live transcription. docs(samples): add sample code for StreamingAnalyzeContent for live transcription. Oct 3, 2022
@rogers140 rogers140 requested a review from kurtisvg October 4, 2022 19:02
@rogers140
Copy link
Member Author

The failed test is flaky, and not related to this PR.

@rogers140 rogers140 requested a review from kurtisvg October 4, 2022 22:15
@kurtisvg kurtisvg added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 5, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 5, 2022
@kurtisvg kurtisvg added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 5, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 5, 2022
@kurtisvg kurtisvg merged commit b6bbd62 into googleapis:main Oct 5, 2022
@parthea parthea added the release-please:force-run To run release-please label Oct 10, 2022
@release-please release-please bot removed the release-please:force-run To run release-please label Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: dialogflow Issues related to the googleapis/python-dialogflow API. samples Issues that are directly related to samples. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0