Skip to content

Configuring espeak driver on MacOS #311

@Sirorezka

Description

@Sirorezka

Hello, I have installed and configured pyttsx3 on my macOS. And by default it uses nsss as driver and this setting works fine. However when I change the driver to espeak I'm unable to get any sound from the driver.

So by default you should have the following error on macOS:

'libespeak.so.1' (no such file)

To solve it I have installed espeak from the brew and linked it's libraries to the missing file:

  1. I have installed espeak using homewbew formula. I did also check that espeak works
brew install  espeak

espeak "This is a test"  
  1. I have created the symlink libespeak.so.1 to a libespeak.dlyb file. As far as I understood the brew renamed .so.1 to .dlyb.
ln -s  /opt/homebrew/Cellar/espeak/1.48.04_1/lib/libespeak.dylib   libespeak.so.1

Now I don't get errors on missing 'libespeak.so.1', but I unfortunately can't hear any voice during execution:

import pyttsx3

engine = pyttsx3.init('espeak', debug=True)
voices = engine.getProperty('voices')
engine.setProperty('voice',voices[11].id) #English

engine.say('Hello sir, how may I help you, sir.')
engine.runAndWait()

So, am I missing something here? Is this solvable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions