| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| config['profanityFilter'] = profanity_filter | ||
| if speech_context is not None: | ||
| config['speechContext'] = {'phrases': speech_context} | ||
| def _build_request_data(content, source_uri, encoding, sample_rate, |
There was a problem hiding this comment.
I'm not 100% but I think there is a utility in google.protobuf for parsing a JSON version of a protobuf message type (here it is Operation)
Sorry, something went wrong.
| >>> operation.complete | ||
| True | ||
| >>> operation.results[0]['alternatives'][0]['transcript'] | ||
| "how old is the Brooklyn Bridge" |
| ... operation.poll() # API call | ||
| >>> operation.complete | ||
| True | ||
| >>> operation.results[0]['alternatives'][0]['transcript'] |
| AMR_WB = 'AMR_WB' | ||
| """AMR_WB encoding type.""" | ||
| from google.cloud.speech.encoding import Encoding | ||
| from google.cloud.speech.operation import Operation |
| config['profanityFilter'] = profanity_filter | ||
| if speech_context is not None: | ||
| config['speechContext'] = {'phrases': speech_context} | ||
| def _build_request_data(content, source_uri, encoding, sample_rate, |
| from google.cloud._helpers import _rfc3339_to_datetime | ||
|
|
||
|
|
||
| class Operation(object): |
| } | ||
| ] | ||
| } | ||
| ] |
| ] | ||
| } | ||
| ] | ||
| } |
| 'startTime': '2016-09-22T17:52:25.536964Z', | ||
| 'lastUpdateTime': '2016-09-22T17:52:27.802902Z' | ||
| }, | ||
| 'done': False |
| 'google.cloud.speech.v1beta1.AsyncRecognizeMetadata'), | ||
| 'progressPercent': 27, | ||
| 'startTime': '2016-09-22T17:52:25.536964Z', | ||
| 'lastUpdateTime': '2016-09-22T17:52:27.802902Z' |
| """The version of the API, used in building the API call's URL.""" | ||
|
|
||
| API_URL_TEMPLATE = '{api_base_url}/{api_version}/speech:{path}' | ||
| API_URL_TEMPLATE = '{api_base_url}/{api_version}/{path}' |
|
@dhermes was there supposed to be a link in here?
|
Sorry, something went wrong.
| encoding, | ||
| self.SAMPLE_RATE) | ||
| self.assertIsInstance(operation, Operation) | ||
| self.assertFalse(operation.complete) |
| ... operation.poll() # API call | ||
| >>> operation.complete | ||
| True | ||
| >>> operation.results[0]['alternatives'][0]['transcript'] |
| """The version of the API, used in building the API call's URL.""" | ||
|
|
||
| API_URL_TEMPLATE = '{api_base_url}/{api_version}/speech:{path}' | ||
| API_URL_TEMPLATE = '{api_base_url}/{api_version}/{path}' |
|
@tseaver I think I got all the things you mentioned. LMKWYT |
Sorry, something went wrong.
| self._requested = [] | ||
|
|
||
| def api_request(self, method, path): | ||
| self._requested.append({'method': method, 'path': path}) |
|
@daspecster Should be OK to merge if you can tweak the assertions for the operations tests (see above). |
Sorry, something went wrong.
Add speech asynchronous recognize support.
Add speech asynchronous recognize support.
Add speech asynchronous recognize support.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.7.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:e7cc6823efb073a8a26e7cefdd869f12ec228abfbd2a44aa9a7eacc284023677 <details><summary>bigframes: 2.35.0</summary> ## [2.35.0](google/bigframes@v2.34.0...v2.35.0) (2026-02-07) ### Features * Add bigframes.pandas.col with basic operators (#2405) ([12741677](google/bigframes@12741677)) * remove redundant "started." messages from progress output (#2440) ([2017cc2f](google/bigframes@2017cc2f)) * add bigframe.bigquery.load_data function (#2426) ([4b0f13b2](google/bigframes@4b0f13b2)) * Disable progress bars in Anywidget mode (#2444) ([4e2689a1](google/bigframes@4e2689a1)) * add bigquery.ai.generate_text function (#2433) ([5bd0029a](google/bigframes@5bd0029a)) * Disable progress bars in Anywidget mode to reduce notebook clutter (#2437) ([853240da](google/bigframes@853240da)) * Add a bigframes cell magic for ipython (#2395) ([e6de52de](google/bigframes@e6de52de)) * add `bigframes.bigquery.ai.generate_embedding` (#2343) ([e91536c8](google/bigframes@e91536c8)) ### Bug Fixes * always display the results in the `%%bqsql` cell magics output (#2439) ([2d973b54](google/bigframes@2d973b54)) * exlcude gcsfs 2026.2.0 (#2445) ([311de31e](google/bigframes@311de31e)) * suppress JSONDtypeWarning in Anywidget mode and clean up progress output (#2441) ([e0d185ad](google/bigframes@e0d185ad)) ### Documentation * fix cast method shown on public docs (#2436) ([ad0f33c6](google/bigframes@ad0f33c6)) </details>
| Back | FazBrowse Home | New Git URL |
Add support for Speech API long running operations.