How to change the voice in espeak from python?

  python, python-3.x, text-to-speech

I’m finishing off a voice assistant project, but I don’t like to default voice on espeak.
How can I change it?

From the CLI I can get a nice American female voice:

$ espeak -v mb-us1 "hello world"

This is the code I’m using to make the computer talk, but it is a male voice:

from subprocess import call
speech="Hello World!"
call(["espeak",speech])

I don’t get how to incorporate the parameters into the call?

Source: Python-3x Questions

LEAVE A COMMENT