Skip to content

Commit

Permalink
fix: library deprecation warnings (#376)
Browse files Browse the repository at this point in the history
* fix: warning message

* docs: correct naming

Co-authored-by: Yvonne <[email protected]>
  • Loading branch information
Yvonne Li and yil532 authored May 23, 2022
1 parent 1ff17ca commit d9edc1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions speech/snippets/speech_to_storage_beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def export_transcript_to_storage_beta(
# get blob from bucket
blob = bucket.get_blob(object_name)

# get content as string
results_string = blob.download_as_string()
# get content as bytes
results_bytes = blob.download_as_bytes()

# get transcript exported in storage bucket
storage_transcript = types.LongRunningRecognizeResponse.from_json(
results_string, ignore_unknown_fields=True
results_bytes, ignore_unknown_fields=True
)

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

0 comments on commit d9edc1b

Please sign in to comment.