Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[speech-to-text] handle Edge case: zero result entries. #198

Closed
monte-hayward opened this issue Jan 8, 2016 · 3 comments
Closed

[speech-to-text] handle Edge case: zero result entries. #198

monte-hayward opened this issue Jan 8, 2016 · 3 comments

Comments

@monte-hayward
Copy link

Can occur when a pipeline sends a chunk of audio that is silent.

monte-hayward added a commit to monte-hayward/node-sdk that referenced this issue Jan 8, 2016
monte-hayward added a commit to monte-hayward/node-sdk that referenced this issue Jan 8, 2016
@nfriedly
Copy link
Contributor

nfriedly commented Jan 8, 2016

Thanks, good catch. I fixed it and added a test.

Question for you (and @germanattanasio and @jsstylos): What do you expect the stream to output for a silent audio file: no data events at all, or at least one data event with an empty string?

(I just copied in your fix which results in no data events at all but my initial test had it failing still because I copped the previous test but had it expecting an empty string instead of some text - I rewrote the test so that it now will pass either way: it's happy as long as there are no data events with truthy values.)

UPDATE: I talked to some folks on the #Node.js IRC and they seem to agree that the current solution (no data events) is preferable.

@nfriedly
Copy link
Contributor

nfriedly commented Jan 8, 2016

Oh, and sorry @monte-hayward - I started looking at this after your first commit and didn't realize that you were also working on a test. It looks like yours is going to be more comprehensive than mine, so we'll go ahead and merge it in once you're ready. One of us will just have to deal with the conflicts.

@germanattanasio
Copy link
Contributor

@monte-hayward thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants