Cannot import name 'enums' from 'google.cloud.texttospeech' Help!

1,313 views
Skip to first unread message

Kaitlyn Weaver

unread,
Jul 1, 2020, 9:48:23 AM7/1/20
to cloud-nl-discuss
I am trying to follow this guide 


And once I get to step 8 'list avaliable voices', I get an error.
ImportError: cannot import name 'enums' from 'google.cloud.texttospeech' (/home/kaitlynweaver24/.local/lib/python3.7/site-packages/google/cloud/texttospeech/__init__.py)

I'm new to coding with cloud shell, and a novice at python so I'm sure it's a basic fix but any help is appreciated!!!


I've made sure the latest libraries are installed, as stated in the earlier steps of the tutorial, and that python is up to date.

I tried 

"pip install enum34"

And received

Requirement already satisfied: enum34 in /usr/local/lib/python3.7/dist-packages (1.1.10)


Thanks for reading!!



cannot import name 'enums' from 'google.cloud.texttospeech'

Abdelilah Fakkar

unread,
Jul 5, 2020, 4:16:22 PM7/5/20
to cloud-nl-discuss
Hi 
I tried the step by step that you shared and I did not reproduce the issue.
in step 8  I added the code below and I was able to get 237 results without any errors:

~~~~

if __name__ == "__main__": list_voices()
~~~~
Reply all
Reply to author
Forward
0 new messages