GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Speech GCS by gguuss · Pull Request #784 · GoogleCloudPlatform/python-docs-samples

Conversation

@gguuss

@gguuss gguuss commented Feb 6, 2017

Copy link
Copy Markdown
Contributor

Adds examples showing transcription from a GCS URI.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gguuss
Adds GCS examples and tests
6ceb525
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 6, 2017
theacodes
theacodes suggested changes Feb 6, 2017
View reviewed changes
Comment thread speech/cloud-client/transcribe.py Outdated

def transcribe_gcs(gcs_uri):
"""Transcribes the audio file specified by the gcs_uri."""
# [START authenticating_gcs]

@theacodes theacodes Feb 6, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta: seems unnecessary to chop this sample up into so many regions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Feb 7, 2017

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, these aren't even referenced anywhere in the docs yet, I'd just stuck to the inherited convention.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread speech/cloud-client/transcribe.py Outdated

# [START construct_request_gcs]
audio_sample = speech_client.sample(
None,

@theacodes theacodes Feb 6, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is None here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Feb 7, 2017

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

content as in there's either content or a gcs_uri

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread speech/cloud-client/transcribe.py Outdated
# [END send_request_gcs]


def main(path):

@theacodes theacodes Feb 6, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We generally don't put main functions in our samples, just place this logic below or do separate subparsers for local path and gcs path.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Feb 7, 2017

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, moved logic to right after the args are parsed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread speech/cloud-client/transcribe_async.py Outdated
operation.poll()

if not operation.complete:
print("Operation not complete and retry limit reached.")

@theacodes theacodes Feb 6, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single quotes everywhere.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Feb 7, 2017

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, I should add a module to my pavlok for such transgressions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread speech/cloud-client/transcribe_async.py
while retry_count > 0 and not operation.complete:
retry_count -= 1
time.sleep(2)
operation.poll()

@theacodes theacodes Feb 6, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought they were going to change this interface soon.... hmm. @dhermes?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dhermes dhermes Feb 6, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_OperationFuture has landed in GAX/GAPIC interfaces and we are slowly working it in

/cc @lukesneeringer

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@theacodes theacodes Feb 6, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, cool, we'll catch it when @dpebot bumps our dependencies.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Feb 7, 2017

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll skip this for now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread speech/cloud-client/transcribe_async_test.py Outdated


def test_transcribe_gcs(resource, capsys):
main('gs://cloud-samples-tests/speech/brooklyn.flac')

@theacodes theacodes Feb 6, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer these to be in the python-docs-samples-tests bucket, provided by cloud_config.bucket.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@gguuss gguuss Feb 7, 2017

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gguuss
Addresses review comments.
364f7cb
theacodes
theacodes reviewed Feb 7, 2017
View reviewed changes
Comment thread speech/cloud-client/transcribe_async_test.py Outdated
import re

from transcribe_async import main
from transcribe_async import transcribe_file, transcribe_gcs

@theacodes theacodes Feb 7, 2017

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final nit: import modules, not names. Just do import transcribe_async and use transcribe_async.transcribe_file, etc.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gguuss
import modules not functions
cede16c
theacodes
theacodes approved these changes Feb 7, 2017
View reviewed changes
@theacodes
theacodes merged commit faddda1 into master Feb 7, 2017
@theacodes
theacodes deleted the speech-gcs branch February 7, 2017 17:53
busunkim96 pushed a commit to busunkim96/python-speech that referenced this pull request Sep 1, 2020
@gguuss Jon Wayne Parrott
Add speech GCS samples [(#784)](GoogleCloudPlatform/python-docs-sampl…
4f91666
…es#784)
busunkim96 pushed a commit to googleapis/python-speech that referenced this pull request Sep 3, 2020
@gguuss @busunkim96
Add speech GCS samples [(#784)](GoogleCloudPlatform/python-docs-sampl…
f9945e5
…es#784)
telpirion pushed a commit that referenced this pull request Jan 13, 2023
@gguuss @busunkim96
Add speech GCS samples [(#784)](#784)
2b28f8e
@telpirion telpirion mentioned this pull request Jan 13, 2023
chore(speech): migrate code from googleapis/python-speech #8982
Merged
8 tasks
dandhlee pushed a commit that referenced this pull request Feb 9, 2023
@gguuss @dandhlee
Add speech GCS samples [(#784)](#784)
560c320
telpirion pushed a commit that referenced this pull request Mar 13, 2023
@gguuss @telpirion
Add speech GCS samples [(#784)](#784)
3139bc6
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 6, 2023
@gguuss @busunkim96
Add speech GCS samples [(#784)](GoogleCloudPlatform/python-docs-sampl…
d5a6110
…es#784)
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 6, 2023
@gguuss @busunkim96
Add speech GCS samples [(#784)](GoogleCloudPlatform/python-docs-sampl…
aa0bd39
…es#784)
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 18, 2023
@gguuss @busunkim96
Add speech GCS samples [(#784)](GoogleCloudPlatform/python-docs-sampl…
e6974c0
…es#784)
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Oct 22, 2023
@gguuss @busunkim96
Add speech GCS samples [(#784)](GoogleCloudPlatform/python-docs-sampl…
fa52bcf
…es#784)
@Linchin Linchin mentioned this pull request Aug 18, 2025
chore: migrate handwritten samples from googleapis/python-bigquery-storage #13543
Merged
9 tasks
Linchin added a commit that referenced this pull request Aug 18, 2025
@renovate-bot @gcf-owl-bot @Linchin
chore(deps): update all dependencies (#784)
1416156
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Lingqing Gan <[email protected]>
chalmerlowe pushed a commit that referenced this pull request Feb 19, 2026
@release-please
chore(main): release 3.7.0 (#784)
50c0c39
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@chalmerlowe chalmerlowe mentioned this pull request Feb 19, 2026
migrate code from googleapis/python-logging #13844
Merged
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@dhermes dhermes dhermes left review comments
@theacodes theacodes theacodes approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@gguuss @theacodes @dhermes @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.