{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3165","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3165/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3165/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3165/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/issues/3165","id":215208737,"number":3165,"title":"\"Client GRPC deadline too short\" for speech streaming_recognize + cannot override defaults","user":{"login":"cgratie","id":9308958,"avatar_url":"https://avatars2.githubusercontent.com/u/9308958?v=3","gravatar_id":"","url":"https://api.github.com/users/cgratie","html_url":"https://github.com/cgratie","followers_url":"https://api.github.com/users/cgratie/followers","following_url":"https://api.github.com/users/cgratie/following{/other_user}","gists_url":"https://api.github.com/users/cgratie/gists{/gist_id}","starred_url":"https://api.github.com/users/cgratie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgratie/subscriptions","organizations_url":"https://api.github.com/users/cgratie/orgs","repos_url":"https://api.github.com/users/cgratie/repos","events_url":"https://api.github.com/users/cgratie/events{/privacy}","received_events_url":"https://api.github.com/users/cgratie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-18T17:31:15Z","updated_at":"2017-03-19T15:48:58Z","closed_at":null,"body":"There is currently no way to override default configuration parameter values when using **google.cloud.speech.Client**. Support is available in **google.cloud.gapic.speech.v1beta1.speech_client.SpeechClient** via the **client_config** constructor argument. However, this is not used in **google.cloud.speech._gax.GAPICSpeechAPI**, where a **SpeechClient** instance is constructed without making use of **client_config**.\r\n\r\nThis means, among other things, that I cannot set the GRPC deadline myself. On the other hand, the default value for timeout present in the configuration file as **\"timeout_millis\"** under **\"StreamingRecognize\"** is **190000**, which should be perfect for a call that needs to be shorter than 1 minute anyway (required deadline is 3 * duration + 5, so 185 should already be enough). However, it looks like the actual value that is sent as a deadline comes from **\"initial_rpc_timeout_millis\"** field from **\"retry_params\"** in the configuration file (I have actually changed that value to 185000 and the error disappeared). I'm not sure why this is the case and I could not figure out where it happens in the code.\r\n\r\nI am experiencing the issue while using the following versions of Python packages:\r\n* gapic-google-cloud-speech-v1beta1 (0.15.3)\r\n* google-auth (0.8.0)\r\n* google-auth-httplib2 (0.0.2)\r\n* google-cloud-core (0.23.1)\r\n* google-cloud-speech (0.23.0)\r\n* google-gax (0.15.8)\r\n* googleapis-common-protos (1.5.2)\r\n* grpcio (1.1.3)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/comments/287625635","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/issues/3165#issuecomment-287625635","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3165","id":287625635,"user":{"login":"daspecster","id":192456,"avatar_url":"https://avatars0.githubusercontent.com/u/192456?v=3","gravatar_id":"","url":"https://api.github.com/users/daspecster","html_url":"https://github.com/daspecster","followers_url":"https://api.github.com/users/daspecster/followers","following_url":"https://api.github.com/users/daspecster/following{/other_user}","gists_url":"https://api.github.com/users/daspecster/gists{/gist_id}","starred_url":"https://api.github.com/users/daspecster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daspecster/subscriptions","organizations_url":"https://api.github.com/users/daspecster/orgs","repos_url":"https://api.github.com/users/daspecster/repos","events_url":"https://api.github.com/users/daspecster/events{/privacy}","received_events_url":"https://api.github.com/users/daspecster/received_events","type":"User","site_admin":false},"created_at":"2017-03-19T15:48:58Z","updated_at":"2017-03-19T15:48:58Z","body":"@cgratie thanks for reporting!\r\n\r\nThe limit for streaming detection [is 1 minute](https://cloud.google.com/speech/limits).\r\nHowever if the GAPIC code isn't using the `timeout_millis` argument there may be a bug there.\r\n\r\nI will look into that and also see about passing that config to the GAPIC API constructor."}}
{"actor":{"display_login":"daspecster"}}