Skip to content

Commit d9edc1b

Browse files
Yvonne Liyil532
Yvonne Li
andauthored
fix: library deprecation warnings (#376)
* fix: warning message * docs: correct naming Co-authored-by: Yvonne <[email protected]>
1 parent 1ff17ca commit d9edc1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

speech/snippets/speech_to_storage_beta.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ def export_transcript_to_storage_beta(
6666
# get blob from bucket
6767
blob = bucket.get_blob(object_name)
6868

69-
# get content as string
70-
results_string = blob.download_as_string()
69+
# get content as bytes
70+
results_bytes = blob.download_as_bytes()
7171

7272
# get transcript exported in storage bucket
7373
storage_transcript = types.LongRunningRecognizeResponse.from_json(
74-
results_string, ignore_unknown_fields=True
74+
results_bytes, ignore_unknown_fields=True
7575
)
7676

7777
# Each result is for a consecutive portion of the audio. Iterate through

0 commit comments

Comments
 (0)