-
Notifications
You must be signed in to change notification settings - Fork 139
docs(samples): add sample code for StreamingAnalyzeContent for live transcription. #575
Conversation
🤖 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 -- conventional-commit-lint bot |
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
There was a problem hiding this 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:
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>
I think the reason why it failed is due to |
The failed test is flaky, and not related to this PR. |
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: