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
2 people authored and dandhlee committed Feb 9, 2023
1 parent c02dd6d commit a5dcdab
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 a5dcdab

Please sign in to comment.