File tree 2 files changed +3
-3
lines changed
videointelligence/samples/analyze
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 45
45
import io
46
46
47
47
48
- def speech_transcription (input_uri ):
48
+ def speech_transcription (input_uri , timeout = 180 ):
49
49
# [START video_speech_transcription_gcs_beta]
50
50
"""Transcribe speech from a video stored on GCS."""
51
51
from google .cloud import videointelligence_v1p1beta1 as videointelligence
@@ -69,7 +69,7 @@ def speech_transcription(input_uri):
69
69
70
70
print ("\n Processing video for speech transcription." )
71
71
72
- result = operation .result (timeout = 180 )
72
+ result = operation .result (timeout )
73
73
74
74
# There is only one annotation_result since only
75
75
# one video is processed.
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ def delete_bucket():
73
73
@pytest .mark .slow
74
74
def test_speech_transcription (capsys ):
75
75
beta_snippets .speech_transcription (
76
- "gs://python-docs-samples-tests/video/googlework_short.mp4"
76
+ "gs://python-docs-samples-tests/video/googlework_short.mp4" , timeout = 240
77
77
)
78
78
out , _ = capsys .readouterr ()
79
79
assert "cultural" in out
You can’t perform that action at this time.
0 commit comments