WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

IndexError: list index out of range #66

@KC2016

Description

@KC2016

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>]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions