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

IndexError: list index out of range #66

Open
KC2016 opened this issue Mar 9, 2020 · 0 comments
Open

IndexError: list index out of range #66

KC2016 opened this issue Mar 9, 2020 · 0 comments

Comments

@KC2016
Copy link

KC2016 commented Mar 9, 2020

Hi,

I am facing an index error because it is producing just 5 items in "voices". Any idea of how can we fix this?

CODE:
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[10].id)

ERROR: IndexError: list index out of range

when I print voices:
[<pyttsx3.voice.Voice object at 0x000001A76764EE88>, <pyttsx3.voice.Voice object at 0x000001A76781A2C8>, <pyttsx3.voice.Voice object at 0x000001A76478B108>, <pyttsx3.voice.Voice object at 0x000001A76478B148>, <pyttsx3.voice.Voice object at 0x000001A7678CDE08>]

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

1 participant