We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ff17ca commit d9edc1bCopy full SHA for d9edc1b
speech/snippets/speech_to_storage_beta.py
@@ -66,12 +66,12 @@ def export_transcript_to_storage_beta(
66
# get blob from bucket
67
blob = bucket.get_blob(object_name)
68
69
- # get content as string
70
- results_string = blob.download_as_string()
+ # get content as bytes
+ results_bytes = blob.download_as_bytes()
71
72
# get transcript exported in storage bucket
73
storage_transcript = types.LongRunningRecognizeResponse.from_json(
74
- results_string, ignore_unknown_fields=True
+ results_bytes, ignore_unknown_fields=True
75
)
76
77
# Each result is for a consecutive portion of the audio. Iterate through
0 commit comments