Comments (8)
Which sample? Shouldn't need to make any modification like this.
from golang-samples.
Here is the sample I had issues with https://github.com/GoogleCloudPlatform/golang-samples/blob/01f58b1df950edfbe1ff28eff9e870fabe6790fc/speech/livecaption/livecaption.go
from golang-samples.
Found out the problem.
Speech API supports only 60 seconds of streaming recognition:
https://cloud.google.com/speech/limits#content
googleapis/google-cloud-node#1894
We need a better error and/or docs. Either the Speech client or underlying Speech API should return a better error.
from golang-samples.
Thank you for reporting this @mattetti, I too encountered the same error, sometime late
last year but things were too noisy for me to file a bug here.
With what @broady deduced in #246 (comment), @mattetti might you be interested or have time to send a PR to fix this? If not, no biggie, it might picked up.
from golang-samples.
@odeke-em unfortunately I moved on and I won't be able to, but thanks a lot for offering.
from golang-samples.
@broady I'll take this one, ok? The new README already states briefly about the limits, but I could make it more explicit in this example. Also, I'll work on a better error message.
from golang-samples.
Sounds good. Thanks.
Not sure if you can do anything about the error message, my first thought is it should be fixed in the backend.
from golang-samples.
Ok, I've finally managed to reproduce the error... there are actually two possible scenarios:
2017/09/22 06:14:23 Could not recognize: code:11 message:"Exceeded maximum allowed stream duration of 65 seconds."
2017/09/22 06:19:46 Could not recognize: code:3 message:"Client GRPC deadline too short. Should be at least: 3 * audio-duration + 5 seconds. Current deadline is: 199.99859053990804 second(s). Required at least: 206 second(s)."
The scenario 1) seems to happen when you submit a speech fragment and it's duration added to the previous fragments is more than 65 seconds. The scenario 2) seems to happen while you are still speaking the last sentence and the stream.Recv
call time outs.
The documentation says:
* Each StreamingRecognize session is considered a single request even though it includes multiple frames of StreamingRecognizeRequest audio within the stream.
I'm going to modify the README to include some notes about the limits, but maybe we could also treat those error codes (3 and 11) to give a better error message in the client itself, instead of printing the raw error message.
What do you think?
from golang-samples.
Related Issues (20)
- run/testing: TestEditorService failed HOT 1
- cloudsql/mysql/database-sql: TestGetVotes failed HOT 1
- securitycenter/muteconfig: TestSetUnmuteFinding failed HOT 2
- securitycenter/muteconfig: TestBulkMuteFinding failed HOT 2
- `context.TODO()` --> `context.Background()`, for consistency
- pubsub/subscriptions: TestPullMsgsAsync failed HOT 1
- storagetransfer: TestGetLatestTransferOperation failed HOT 1
- storage/service_account/hmac: TestDeleteKey failed HOT 2
- storage: add object retention samples
- healthcare: TestDICOMStore failed HOT 1
- media/videostitcher: TestListSlates failed HOT 1
- datacatalog/datacatalog_quickstart: TestApp failed HOT 1
- asset/quickstart/batch-get-effective-iam-policies: TestMain failed HOT 1
- asset/quickstart/search-all-resources: TestMain failed HOT 1
- dlp/snippets/deid: TestDeIdentifyWithRedact failed HOT 1
- dlp/snippets/deid: TestReidFPE failed HOT 1
- run/testing: TestImageProcessingService failed HOT 1
- pubsub/topics: TestCreate failed HOT 1
- asset/quickstart/search-all-resources: TestMain failed HOT 1
- storagetransfer: TestGetLatestTransferOperation failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golang-samples.