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 continuous by nnegrey · Pull Request #1940 · GoogleCloudPlatform/python-docs-samples

Conversation

@nnegrey

@nnegrey nnegrey commented Dec 18, 2018

Copy link
Copy Markdown
Contributor

No description provided.

Sorry, something went wrong.

Uh oh!

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

All reactions
Jerjou Cheng and others added 5 commits May 31, 2018 10:28
Jerjou Cheng
Draft 1: indefinitely-long streaming transcription
c6f5f11
Jerjou Cheng
Clean up & refactor of indefinite speech transcrib
1c71119
Jerjou Cheng
Make sure chunks_per_second is a whole number.
0ba088a
Jerjou Cheng
Update for google-cloud-python client lib.
b0bd8e9
@nnegrey
Update sample to not error out, but make a new request every ~60ish s…
b25330a
…econds
@nnegrey
nnegrey requested a review from dizcology December 18, 2018 00:10
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 18, 2018
nnegrey added 2 commits December 17, 2018 16:13
@nnegrey
Merge branch 'master' into speech-continuous
62354a2
@nnegrey
Update transcribe_streaming_mic.py
c8fb089
dizcology
dizcology reviewed Dec 18, 2018
View reviewed changes
Comment thread speech/cloud-client/transcribe_streaming_indefinite.py
pip install pyaudio

Example usage:
python transcribe_streaming_indefinite.py

@dizcology dizcology Dec 18, 2018

Copy link
Copy Markdown
Member

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.

indefinite or infinite?

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread speech/cloud-client/transcribe_streaming_indefinite.py


def get_current_time():
return int(round(time.time() * 1000))

@dizcology dizcology Dec 18, 2018

Copy link
Copy Markdown
Member

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.

probably don't need both int and round

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread speech/cloud-client/transcribe_streaming_indefinite.py Outdated
"""Opens a recording stream as a generator yielding the audio chunks."""
def __init__(self):
self._rate = SAMPLE_RATE
self._chunk_size = CHUNK_SIZE

@dizcology dizcology Dec 18, 2018

Copy link
Copy Markdown
Member

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.

nit: these should be passed into __init__ as arguments, possible defaulting to those global variables.

Sorry, something went wrong.

Uh oh!

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

All reactions

@nnegrey nnegrey Dec 19, 2018

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.

Updated

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread speech/cloud-client/transcribe_streaming_indefinite.py Outdated
self._bytes_per_chunk = (self._chunk_size * self._bytes_per_sample)
self._chunks_per_second = (
self._bytes_per_second // self._bytes_per_chunk)
self._untranscribed = collections.deque(

@dizcology dizcology Dec 18, 2018

Copy link
Copy Markdown
Member

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.

it is not very easy to trace through the code to understand how this second buffer self._untranscribed is needed.

Sorry, something went wrong.

Uh oh!

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

All reactions

@nnegrey nnegrey Dec 19, 2018

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.

Right, removed. Before it was holding over audio that might have failed, because it was waiting for the Error of streaming for too long, but updated to restart before that error making it's use redundant.

Sorry, something went wrong.

Uh oh!

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

All reactions
nnegrey and others added 5 commits December 18, 2018 16:16
@nnegrey
Clean up unnecessary code, since we no longer wait for it to error out
0b009fb
@nnegrey
Update based on feedback
f576f9e
@nnegrey
Merge branch 'speech-continuous' of https://github.com/GoogleCloudPla…
fce535c
…tform/python-docs-samples into speech-continuous
@nnegrey
Merge branch 'master' into speech-continuous
06d09c6
@nnegrey
Merge branch 'master' into speech-continuous
bbef44f
dizcology
dizcology approved these changes Dec 26, 2018
View reviewed changes

@dizcology dizcology left a comment

Copy link
Copy Markdown
Member

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.

looks good.

please explore ways of testing this.

Sorry, something went wrong.

Uh oh!

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

All reactions
@nnegrey
Merge branch 'master' into speech-continuous
48ae540
@nnegrey
nnegrey merged commit 7bb425d into master Jan 15, 2019
@nnegrey
nnegrey deleted the speech-continuous branch January 15, 2019 20:19
busunkim96 pushed a commit to busunkim96/python-speech that referenced this pull request Sep 1, 2020
@nnegrey
Speech continuous [(#1940)](GoogleCloudPlatform/python-docs-samples#1940
545a4e5
)

* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
busunkim96 pushed a commit to googleapis/python-speech that referenced this pull request Sep 3, 2020
@nnegrey @busunkim96
Speech continuous [(#1940)](GoogleCloudPlatform/python-docs-samples#1940
8c2e1e4
)

* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
@telpirion telpirion mentioned this pull request Jan 13, 2023
chore(speech): migrate code from googleapis/python-speech #8982
Merged
8 tasks
telpirion pushed a commit that referenced this pull request Jan 13, 2023
@nnegrey @busunkim96
Speech continuous [(#1940)](#1940)
8bf5019
* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
dandhlee pushed a commit that referenced this pull request Feb 9, 2023
@nnegrey @dandhlee
Speech continuous [(#1940)](#1940)
c392311
* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
telpirion pushed a commit that referenced this pull request Mar 13, 2023
@nnegrey @telpirion
Speech continuous [(#1940)](#1940)
92cdbbd
* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 6, 2023
@nnegrey @busunkim96
Speech continuous [(#1940)](GoogleCloudPlatform/python-docs-samples#1940
bf80570
)

* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 6, 2023
@nnegrey @busunkim96
Speech continuous [(#1940)](GoogleCloudPlatform/python-docs-samples#1940
2dc2729
)

* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
atulep pushed a commit to googleapis/google-cloud-python that referenced this pull request Apr 18, 2023
@nnegrey @busunkim96
Speech continuous [(#1940)](GoogleCloudPlatform/python-docs-samples#1940
c46ea42
)

* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request Oct 22, 2023
@nnegrey @busunkim96
Speech continuous [(#1940)](GoogleCloudPlatform/python-docs-samples#1940
6d188d8
)

* Draft 1: indefinitely-long streaming transcription

* Clean up & refactor of indefinite speech transcrib

* Make sure chunks_per_second is a whole number.

* Update for google-cloud-python client lib.

* Update sample to not error out, but make a new request every ~60ish seconds

* Update transcribe_streaming_mic.py

* Clean up unnecessary code, since we no longer wait for it to error out

* Update based on feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dizcology dizcology dizcology approved these changes

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.

6 participants

@nnegrey @jerjou @dizcology @chr1sGit @vishwanathakuthota @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.