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 — Add stability information to streaming results. by daspecster · Pull Request #2714 · googleapis/google-cloud-python

Conversation

@daspecster

@daspecster daspecster commented Nov 10, 2016

Copy link
Copy Markdown
Contributor

Towards #2522.

This changes the surface, since is_final and stability are per-result and not a per-alternative.

Sorry, something went wrong.

Uh oh!

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

All reactions
@daspecster daspecster added the api: speech Issues related to the Speech-to-Text API. label Nov 10, 2016
@daspecster daspecster assigned tseaver and dhermes Nov 10, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 10, 2016
@daspecster
daspecster force-pushed the add-stability-to-speech-results branch from 7fb59d4 to 9f2c34e Compare November 10, 2016 18:04
dhermes
dhermes reviewed Nov 10, 2016
View reviewed changes

@dhermes dhermes left a comment

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 started out 👎 on the new class but it seems "necessary" in some sense. The only other alternative would be to return a tuple with all the data

results, stability, is_final

But maybe I am not grokking the interface correctly

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread docs/speech-usage.rst
>>> print(results[0].alternatives[0].transcript)
hello
>>> print(alternatives[0].confidence)
>>> print(results[0].alternatives[0].confidence)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/google/cloud/speech/client.py Outdated
profanity_filter, speech_context)


class StreamingSpeechResult(object):

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/google/cloud/speech/client.py Outdated
"""Streaming speech result representation.

:type alternatives: list
:param alternatives: List of protobuf speech alternatives.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/google/cloud/speech/client.py Outdated
:param stability: 0.0-1.0 stability score for the results returned.

:rtype: :class:`~google.cloud.speech.client.StreamingSpeechResult`
:returns: Instance of ``StreamingSpeechResult``.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/google/cloud/speech/client.py Outdated
"""
def __init__(self, alternatives, is_final=False, stability=0.0):
self._alternatives = [Alternative.from_pb(alternative)
for alternative in alternatives]

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/google/cloud/speech/client.py Outdated

:type response: :class:`~google.cloud.grpc.speech.v1beta1\
.cloud_speech_pb2.StreamingRecognizeResult`
:param response: Istance of ``StreamingRecognizeResult`` protobuf.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/google/cloud/speech/client.py Outdated
.cloud_speech_pb2.StreamingRecognizeResult`
:param response: Istance of ``StreamingRecognizeResult`` protobuf.

:rtype: :class:`~google.cloud.speech.client.StreamingSpeechResult`

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/google/cloud/speech/client.py Outdated
return self._alternatives

@property
def is_final(self):

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/google/cloud/speech/client.py Outdated
return self._is_final

@property
def stability(self):

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

Comment thread speech/unit_tests/test_client.py
self.assertEqual(results[0], [])
self.assertEqual(results[1][0].transcript,

self.assertIsInstance(results[0], StreamingSpeechResult)

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

@daspecster

daspecster commented Nov 10, 2016

Copy link
Copy Markdown
Contributor Author

I'm totally open to ideas(regarding StreamingSpeechResult class). I had this class in a previous branch, and from discussions before, it sounded like you were for bringing protobuf data into our own classes as an abstraction.

All reactions

Sorry, something went wrong.

Uh oh!

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

@daspecster

daspecster commented Nov 10, 2016

Copy link
Copy Markdown
Contributor Author

@dhermes CircleCI is winning my love.

Did you have anything else for this?

All reactions

Sorry, something went wrong.

Uh oh!

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

@dhermes

dhermes commented Nov 11, 2016

Copy link
Copy Markdown
Contributor

You also forgot to check in a new RST file for result.py

All reactions

Sorry, something went wrong.

Uh oh!

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

@dhermes

dhermes commented Nov 11, 2016

Copy link
Copy Markdown
Contributor

LGTM once you fix your b0rken docs situation

All reactions

Sorry, something went wrong.

Uh oh!

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

@daspecster
daspecster force-pushed the add-stability-to-speech-results branch from 25aad88 to 71a0d55 Compare November 11, 2016 13:54
@daspecster
Add stability information to streaming results. Fixes googleapis#2702.
38e0887
@daspecster
daspecster force-pushed the add-stability-to-speech-results branch from 71a0d55 to 38e0887 Compare November 11, 2016 15:09
@daspecster

daspecster commented Nov 11, 2016

Copy link
Copy Markdown
Contributor Author

Everything went green. Squashed and I'll just make sure it goes green again and then I'll merge.

All reactions

Sorry, something went wrong.

Uh oh!

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

@daspecster
daspecster merged commit f364416 into googleapis:master Nov 11, 2016
@daspecster
daspecster deleted the add-stability-to-speech-results branch November 11, 2016 15:45
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
@daspecster
Merge pull request googleapis#2714 from daspecster/add-stability-to-s…
a872295
…peech-results

Add stability information to streaming results.
@theacodes theacodes unassigned dhermes Sep 28, 2018
atulep pushed a commit that referenced this pull request Apr 3, 2023
@daspecster
Merge pull request #2714 from daspecster/add-stability-to-speech-results
28627f2
Add stability information to streaming results.
atulep pushed a commit that referenced this pull request Apr 18, 2023
@daspecster
Merge pull request #2714 from daspecster/add-stability-to-speech-results
045abc2
Add stability information to streaming results.
parthea pushed a commit that referenced this pull request Jun 4, 2023
@arithmetic1728 @sethvargo
@kurtisvg @gwhitehawk @renovate-bot Takashi Matsuo @leahecole
chore: move samples from python-docs-samples (#41)
15c8567
* Add initial Secret Manager samples [(#2664)](GoogleCloudPlatform/python-docs-samples#2664)

* Bump secretmanager version [(#2699)](GoogleCloudPlatform/python-docs-samples#2699)

This bumps to the version that doesn't have a bunch of deprecation
warnings.

* Fix a small comment typo [(#2714)](GoogleCloudPlatform/python-docs-samples#2714)

* Add Secret Manager IAM samples [(#2749)](GoogleCloudPlatform/python-docs-samples#2749)

* Add Secret Manager IAM samples

* Use an envvar for the iam user

* Add env var to secrets.

Co-authored-by: Kurtis Van Gent <[email protected]>

* SecretManager update v1beta1->v1 [(#3065)](GoogleCloudPlatform/python-docs-samples#3065)

Client library has been updated: https://pypi.org/project/google-cloud-secret-manager/

* Simplify noxfile setup. [(#2806)](GoogleCloudPlatform/python-docs-samples#2806)

* chore(deps): update dependency requests to v2.23.0

* Simplify noxfile and add version control.

* Configure appengine/standard to only test Python 2.7.

* Update Kokokro configs to match noxfile.

* Add requirements-test to each folder.

* Remove Py2 versions from everything execept appengine/standard.

* Remove conftest.py.

* Remove appengine/standard/conftest.py

* Remove 'no-sucess-flaky-report' from pytest.ini.

* Add GAE SDK back to appengine/standard tests.

* Fix typo.

* Roll pytest to python 2 version.

* Add a bunch of testing requirements.

* Remove typo.

* Add appengine lib directory back in.

* Add some additional requirements.

* Fix issue with flake8 args.

* Even more requirements.

* Readd appengine conftest.py.

* Add a few more requirements.

* Even more Appengine requirements.

* Add webtest for appengine/standard/mailgun.

* Add some additional requirements.

* Add workaround for issue with mailjet-rest.

* Add responses for appengine/standard/mailjet.

Co-authored-by: Renovate Bot <[email protected]>

* chore: some lint fixes [(#3749)](GoogleCloudPlatform/python-docs-samples#3749)

* chore(deps): update dependency google-cloud-secret-manager to v1 [(#3846)](GoogleCloudPlatform/python-docs-samples#3846)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [google-cloud-secret-manager](https://togithub.com/googleapis/python-secret-manager) | major | `==0.2.0` -> `==1.0.0` |

---

### Release Notes

<details>
<summary>googleapis/python-secret-manager</summary>

### [`v1.0.0`](https://togithub.com/googleapis/python-secret-manager/blob/master/CHANGELOG.md#&#8203;100-httpswwwgithubcomgoogleapispython-secret-managercomparev020v100-2020-05-20)

[Compare Source](https://togithub.com/googleapis/python-secret-manager/compare/v0.2.0...v1.0.0)

##### Features

-   release as production/stable ([#&#8203;24](https://www.github.com/googleapis/python-secret-manager/issues/24)) ([39a8cc8](https://www.github.com/googleapis/python-secret-manager/commit/39a8cc8f631569c82d1cbffc6a9bbb440d380683))

</details>

---

### Renovate configuration

:date: **Schedule**: At any time (no schedule defined).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Never, or you tick the rebase/retry checkbox.

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#GoogleCloudPlatform/python-docs-samples).

* Replace GCLOUD_PROJECT with GOOGLE_CLOUD_PROJECT. [(#4022)](GoogleCloudPlatform/python-docs-samples#4022)

* chore(deps): update dependency pytest to v5.4.3 [(#4279)](GoogleCloudPlatform/python-docs-samples#4279)

* chore(deps): update dependency pytest to v5.4.3

* specify pytest for python 2 in appengine

Co-authored-by: Leah Cole <[email protected]>

* Update dependency pytest to v6 [(#4390)](GoogleCloudPlatform/python-docs-samples#4390)

* chore: update templates

Co-authored-by: Seth Vargo <[email protected]>
Co-authored-by: Kurtis Van Gent <[email protected]>
Co-authored-by: gwhitehawk <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Takashi Matsuo <[email protected]>
Co-authored-by: Leah Cole <[email protected]>
parthea pushed a commit that referenced this pull request Oct 22, 2023
@daspecster
Merge pull request #2714 from daspecster/add-stability-to-speech-results
e41c03e
Add stability information to streaming results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@dhermes dhermes dhermes left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@tseaver tseaver

Labels

api: speech Issues related to the Speech-to-Text API. 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

@daspecster @dhermes @tseaver @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.