0

I know that this question is asked a lot(i've been browsing through dozens of questions like mine), but i'm not able to find a solution.

I know that using

voices = engine.setProperty('voice', 'id')

should change the voice, but using

voices = engine.setProperty('voice' b'english-us')

doesn't seem to work, i've tried putting b'english-us' between quotation marks, but doesn't work either. If i could get the voice to change i'd be satisfied, but my intention is to use a voice from eSpeak, wich acording to various answers on different forums is actually possible.

Can anybody help me? I'm using python 3.5.3 and pyttsx 1.2

Alex Coronas
  • 468
  • 1
  • 6
  • 21

1 Answers1

0

I found out a way to select the voice.

engine = pyttsx.init() 
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[whatever].id)

Being whatever the place of the voice in the array.

Alex Coronas
  • 468
  • 1
  • 6
  • 21