ai4r / SGToolkit

SGToolkit: An Interactive Gesture Authoring Toolkit for Embodied Conversational Agents (UIST 2021)
Other
43 stars 6 forks source link

google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded #3

Closed zf223669 closed 2 years ago

zf223669 commented 2 years ago

Hi, I have set up all the code and run the waitress_server.py. however, I got an error after I clicked the generate button: Serving on http://0.0.0.0:8080 WARNING:waitress.queue:Task queue depth is 1 WARNING:waitress.queue:Task queue depth is 1

request time: 2022-02-18 20:12:08.608357 request IP: 127.0.0.1 Hello, Good Day! Hello Good Day ERROR:app:Exception on /api/input [POST] Traceback (most recent call last): File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 67, in error_remappedcallable return callable(*args, **kwargs) File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/grpc/_channel.py", line 946, in call return _end_unary_response_blocking(state, call, False, None) File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/grpc/_channel.py", line 849, in _end_unary_response_blocking raise _InactiveRpcError(state) grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.DEADLINE_EXCEEDED details = "Deadline Exceeded" debug_error_string = "{"created":"@1645186348.609248123","description":"Deadline Exceeded","file":"src/core/ext/filters/deadline/deadline_filter.cc","file_line":81,"grpc_status":4}"

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/home/zf223669/Mount/SGToolkit/SGToolkit/app.py", line 163, in input_text_post style_values=style_constraints, voice=content.get('voice')) File "/home/zf223669/Mount/SGToolkit/SGToolkit/sg_core/scripts/gesture_generator.py", line 79, in generate tts_filename = self.tts.synthesis(input_text, voice_name=voice_name, verbose=True) File "/home/zf223669/Mount/SGToolkit/SGToolkit/sg_core/scripts/utils/tts_helper.py", line 118, in synthesis response = self.client.synthesize_speech(synthesis_input, voice, audio_config) File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/google/cloud/texttospeech_v1/gapic/text_to_speech_client.py", line 322, in synthesize_speech request, retry=retry, timeout=timeout, metadata=metadata File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/google/api_core/gapic_v1/method.py", line 145, in call return wrapped_func(*args, *kwargs) File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/google/api_core/retry.py", line 291, in retry_wrapped_func on_error=on_error, File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/google/api_core/retry.py", line 189, in retry_target return target() File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout return func(args, kwargs) File "/home/zf223669/Mount/anaconda3/envs/SGToolkit/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 69, in error_remapped_callable six.raise_from(exceptions.from_grpc_error(exc), exc) File "", line 3, in raise_from google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded

youngwoo-yoon commented 2 years ago

Hello, It seems like a problem in using Google TTS API. Please make sure you did setup Google API correctly and try to run a sample code in Google API manual.

muyuelingxiao commented 2 years ago

I run a sample code successfully. 图片 But still has the error: 图片

muyuelingxiao commented 2 years ago

Good news. I follow this link(https://github.com/googleapis/python-texttospeech) and the manual (https://cloud.google.com/docs/authentication/getting-started). Then restart the terminal and Server. I am so happy now.