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 <liyvonne@google.com>
  • Loading branch information
2 people authored and telpirion committed Mar 13, 2023
1 parent cb2e4dd commit 67fc09a
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 67fc09a

Please sign in to comment.