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

Issues with Google Cloud Text-to-Speech API? #3

Open
bepuzzled opened this issue Jun 29, 2019 · 1 comment
Open

Issues with Google Cloud Text-to-Speech API? #3

bepuzzled opened this issue Jun 29, 2019 · 1 comment

Comments

@bepuzzled
Copy link

Hello, I am having an error, wheras previously I was able to use your container out of the box.


sudo docker run -v /volume1/homes/doc2audiobook/data:/data:rw -v /volume1/homes/doc2audiobook/.secrets/client_secret.json:/.secrets/client_secret.json:ro doc2audiobook -list-voices
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 54, in error_remapped_callable
    return callable_(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/grpc/_channel.py", line 487, in __call__
    return _end_unary_response_blocking(state, call, False, deadline)
  File "/usr/local/lib/python3.6/site-packages/grpc/_channel.py", line 437, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with (StatusCode.DEADLINE_EXCEEDED, Deadline Exceeded)>

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/google/api_core/retry.py", line 177, in retry_target
    return target()
  File "/usr/local/lib/python3.6/site-packages/google/api_core/timeout.py", line 206, in func_with_timeout
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 56, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 2, in raise_from
google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded

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

Traceback (most recent call last):
  File "/code/doc2audiobook/doc2audiobook.py", line 92, in <module>
    main()
  File "/code/doc2audiobook/doc2audiobook.py", line 64, in main
    available_voices = list_voices(client=client)
  File "/code/doc2audiobook/lib/tts_utils.py", line 77, in list_voices
    return [voice.name for voice in client.list_voices().voices]
  File "/usr/local/lib/python3.6/site-packages/google/cloud/texttospeech_v1beta1/gapic/text_to_speech_client.py", line 167, in list_voices
    request, retry=retry, timeout=timeout, metadata=metadata)
  File "/usr/local/lib/python3.6/site-packages/google/api_core/gapic_v1/method.py", line 139, in __call__
    return wrapped_func(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/google/api_core/retry.py", line 260, in retry_wrapped_func
    on_error=on_error,
  File "/usr/local/lib/python3.6/site-packages/google/api_core/retry.py", line 195, in retry_target
    last_exc)
  File "<string>", line 2, in raise_from
google.api_core.exceptions.RetryError: Deadline of 600.0s exceeded while calling functools.partial(<function _wrap_unary_errors.<locals>.error_remapped_callable at 0x7f31e9fefe18>, , metadata=[('x-goog-api-client', 'gl-python/3.6.5 gapic/0.1.0 gax/1.1.0 grpc/1.10.1')]), last exception: 504 Deadline Exceeded

It appears the issue is in the interface with the GCP; I refreshed my secrets.json file to no avail.
I get the same error with:

sudo docker run \
> -v /volume1/homes/doc2audiobook/data:/data:rw \
> -v /volume1/homes/doc2audiobook/.secrets/client_secret.json:/.secrets/client_secret.json:ro \
> doc2audiobook --voice en-US-Wavenet-A

The input file diagnostics was fine:


docker run -v /volume1/homes/doc2audiobook/data:/data:rw --entrypoint "textract" doc2audiobook /data/input/ship.docx
Turn the ship around, by  L. David Marquet

Penguin Publishing Group

Published February 2017


FOREWORD

I had the opportunity to ride the USS Santa Fe during Captain Marquet’s command tour and observed firsthand the impact of his leadership approach. It had a profound impact on what I thought possible in terms of empowered and engaged workplaces.

@danthelion
Copy link
Owner

Hey @bepuzzled, sorry for the heavily delayed answer. I'm actually not sure what could have caused this issue and I can't replicate it. Maybe try updating the google-cloud-texttospeech python library, see if that solves anything.

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

No branches or pull requests

2 participants