Skip to content

RuntimeError: espeak not installed on your system #44

Open

Description

@PasaOpasen

How to solve RuntimeError: espeak not installed on your system on Windows without using Linux in Windows?

Activity

  1. mmmaat commented on May 25, 2020

    @mmmaat
    Collaborator
  2. PasaOpasen commented on May 26, 2020

    @PasaOpasen
    Author

    Yes, I did it and can open and use espeak application, but phonemizer raises that error still

  3. mmmaat commented on May 26, 2020

    @mmmaat
    Collaborator

    Ok, so I suppose espeak-ng is not in your PATH. But phonemizer provides an alternative way to specify the path to espeak: you can setup the environment variable PHONEMIZER_ESPEAK_PATH with the absolute path to espeak (see https://github.com/bootphon/phonemizer/blob/master/phonemizer/backend/espeak.py#L62).

  4. PasaOpasen commented on May 26, 2020

    @PasaOpasen
    Author

    The path to espeak is the path to folder with TTSApp.exe, sure?

    After creating this path I have an error:

    PHONEMIZER_ESPEAK_PATH=C:\Program Files (x86)\eSpeak is not an executable file
    

    Which path should I use? To which file?

  5. mmmaat commented on May 26, 2020

    @mmmaat
    Collaborator

    I don't have Windows so I cannot really help you with hands on... It has already been used on Windows and you are the first one to report such an issue. The PHONEMIZER_ESPEAK_PATH must be an absolute path to the .exe file, along with the .exe extension.

    Maybe PHONEMIZER_ESPEAK_PATH=C:\Program Files (x86)\eSpeak.exe will work? If you have such a file... The good file must be an executable one, usable from command line (not a GUI one).

    You can also try this one: http://sourceforge.net/projects/espeak/files/espeak/espeak-1.48/setup_espeak-1.48.04.exe

  6. PasaOpasen commented on May 26, 2020

    @PasaOpasen
    Author

    Very good! There was the file C:\Program Files (x86)\eSpeak\command_line\espeak.exe and I did assign it to PHONEMIZER_ESPEAK_PATH. Now it works!

  7. sujithvoona commented on Nov 9, 2020

    @sujithvoona

    Hey @PasaOpasen, before setting the environment variable path as PHONEMIZER_ESPEAK_PATH = C:\Program Files (x86)\eSpeak\command_line\espeak.exe did you store espeak.py file at any specific place.

    Did the error got cleared after placing this espeak.py at a certain place and you set the environment variable path or you had nothing to do with the espeak.py file and set the environment variable "PHONEMIZER_ESPEAK_PATH"

    I created a new environment variable PHONEMIZER_ESPEAK_PATH and I gave the path same as you C:\Program Files (x86)\eSpeak\command_line\espeak.exe. I am still facing the error.

    Please help.

  8. danthemango commented on Apr 1, 2021

    @danthemango

    That's because you're trying to add the path to the .exe file, you need to add the directory instead to the PATH variable:
    "C:\Program Files (x86)\eSpeak\command_line"

  9. changed the title [-]RuntimeError: espeak not installed on your system[/-] [+][Windows] RuntimeError: espeak not installed on your system[/+] on May 10, 2021
  10. richardfoltin commented on Jan 9, 2022

    @richardfoltin

    The variable name is changed to PHONEMIZER_ESPEAK_LIBRARY and it refers to the .dll now:
    PHONEMIZER_ESPEAK_LIBRARY="c:\Program Files\eSpeak NG\libespeak-ng.dll"

  11. cantabile-kwok commented on Jan 26, 2022

    @cantabile-kwok

    The variable name is changed to PHONEMIZER_ESPEAK_LIBRARY and it refers to the .dll now: PHONEMIZER_ESPEAK_LIBRARY="c:\Program Files\eSpeak NG\libespeak-ng.dll"

    This worked very well and saved me a headache, thanks!

  12. wukongsleeping commented on Jul 27, 2022

    @wukongsleeping

    注意是PHONEMIZER_ESPEAK_LIBRARY和PHONEMIZER_ESPEAK_PATH
    1.PHONEMIZER_ESPEAK_LIBRARY="c:\Program Files\eSpeak NG\libespeak-ng.dll"
    2.PHONEMIZER_ESPEAK_PATH =“c:\Program Files\eSpeak NG”

  13. TheKOG commented on Aug 13, 2022

    @TheKOG

    注意是PHONEMIZER_ESPEAK_LIBRARY和PHONEMIZER_ESPEAK_PATH 1.PHONEMIZER_ESPEAK_LIBRARY="c:\Program Files\eSpeak NG\libespeak-ng.dll" 2.PHONEMIZER_ESPEAK_PATH =“c:\Program Files\eSpeak NG”

    finally it works!

  14. avst65t commented on Oct 10, 2022

    @avst65t

    1.PHONEMIZER_ESPEAK_LIBRARY = C:\Program Files\eSpeak NG\libespeak-ng.dll
    2.PHONEMIZER_ESPEAK_PATH = C:\Program Files\eSpeak NG

    click new and add these variables to your system variables in environment variables
    it will work

  15. 37 remaining items

  16. cmp-nct commented on Nov 24, 2023

    @cmp-nct

    Ok... This issue seems to cause a lot of troubles since a long time... I just updated the Windows installation instructions (https://bootphon.github.io/phonemizer/install.html#on-windows). Hope this helps.

    I do not use - and don't know much about - Windows or MacOS so it's difficult for me to help or replicate problems from this thread.

    Anyway I welcome any PR with improvement on the documentation from Windows/macOs users 🥇, thank you!

    Add this hint to the Windows instructions:
    conda env config vars set PHONEMIZER_ESPEAK_PATH=“C:\Program Files\eSpeak NG”
    conda env config vars set PHONEMIZER_ESPEAK_LIBRARY="C:\Program Files\eSpeak NG\libespeak-ng.dll"

    I've tried a ton of things, including renaming the library (removing lib from libespeak-ng.dll removed 50% of the errors but then it got stuck again) or copying it into system32, nothing worked to get through the "layers of detection", those two environment variables did it.

  17. teddybear082 commented on Dec 9, 2023

    @teddybear082

    In Anaconda environment, install espeak-ng then conda env config vars set PHONEMIZER_ESPEAK_PATH=“C:\Program Files\eSpeak NG” conda env config vars set PHONEMIZER_ESPEAK_LIBRARY="C:\Program Files\eSpeak NG\libespeak-ng.dll" It just worked.

    THANK YOU SO MUCH. I spent over an hour this morning trying to get espeak phonemizer, which is a depency of styletts2, working on my system with anaconda, and your solution finally solved it

  18. iackov commented on Mar 5, 2024

    @iackov

    My Solution for Windows:

    from phonemizer.backend.espeak.wrapper import EspeakWrapper
    EspeakWrapper.set_library('C:\Program Files\eSpeak NG\libespeak-ng.dll')

    eSpeak NG - Installed from official site (msi)

  19. matmult commented on Mar 10, 2024

    @matmult

    @sunnnnnnnny this is usually a bad idea to edit files from the standard library... Instead you may want to set the environment variable PHONEMIER_ESPEAK_LIBRARY=/opt/homebrew/lib/espeak.dylib (or the actual path to the espeak library on your machine). Or you can use/adapt this Python snippet:

    from phonemizer.backend.espeak.wrapper import EspeakWrapper
    _ESPEAK_LIBRARY = 'C:\Program Files\eSpeak NG\libespeak-ng.dll'
    EspeakWrapper.set_library(_ESPEAK_LIBRARY)

    This finally fixed it for me, but using export PHONEMIZER_ESPEAK_LIBRARYPATH="/opt/homebrew/Cellar/espeak/1.48.04_1/lib/libespeak.dylib" is still broken for me on zsh. Am I using the wrong env variable name?

  20. jthack commented on Oct 3, 2024

    @jthack

    this is what works on my mac:
    export PHONEMIZER_ESPEAK_LIBRARY=/opt/homebrew/lib/libespeak-ng.dylib

  21. MonolithFoundation commented on Nov 15, 2024

    @MonolithFoundation

    I didn't get it, forabout 200 years, why phonemizer founding espeak lib can't found more wisely?
    If uses need to do it over and over again, why not wisely choose it inside phonemizer? @bootphon

  22. karo-zhebrak commented on Jan 5, 2025

    @karo-zhebrak

    If you installed espeak with homebrew, set these in the PATH:

    export PHONEMIZER_ESPEAK_LIBRARY=/opt/homebrew/lib/libespeak-ng.dylib
    export PHONEMIZER_ESPEAK_PATH=/opt/homebrew/bin

  23. thewh1teagle commented on Jan 11, 2025

    @thewh1teagle
    Contributor

    Once this PR merged:

    It will be possible to use espeakng-loader with no need to install espeak-ng system wide!

    Meanwhile if you want you can use along with phonemizer-fork which has the merged PR

  24. bfrisco-raft commented on Jan 17, 2025

    @bfrisco-raft

    Once this PR merged:

    It will be possible to use espeakng-loader with no need to install espeak-ng system wide!

    Meanwhile if you want you can use along with phonemizer-fork which has the merged PR

    Will this still require espeak to query the Audio Card?

    Nevermind, I fixed that, the wrong bit is being triggered for the espeak init. I will put a PR in for that as well, however I think The owner no longer works on the project.

  25. added a commit that references this issue on Jan 28, 2025
  26. added a commit that references this issue on Jan 28, 2025
  27. DaynerKurdi commented on Sep 27, 2025

    @DaynerKurdi

    Hello, I seem to have problems linking phonemizer with espeak on Windows 11,

    Got espeak installed (1.52-dev), and got it working,

    I added the system environment variables to my system.

    PHONEMIZER_ESPEAK_PATH= C:\Program Files (x86)\eSpeak NG
    PHONEMIZER_ESPEAK_LIBRARY= C:\Program Files (x86)\eSpeak NG\libespeak-ng.dll

    Sadly, phonemizer still does not detect and keeps getting this error.
    Fatal error: espeak not installed on your system.

    Which odd.

    I installed espeak on my local machine via .msi and tested it out with cmd.

  28. carlos-chourio commented on Dec 18, 2025

    @carlos-chourio

    Hello, I seem to have problems linking phonemizer with espeak on Windows 11,

    Got espeak installed (1.52-dev), and got it working,

    I added the system environment variables to my system.

    PHONEMIZER_ESPEAK_PATH= C:\Program Files (x86)\eSpeak NG PHONEMIZER_ESPEAK_LIBRARY= C:\Program Files (x86)\eSpeak NG\libespeak-ng.dll

    Sadly, phonemizer still does not detect and keeps getting this error. Fatal error: espeak not installed on your system.

    Which odd.

    I installed espeak on my local machine via .msi and tested it out with cmd.

    I think you needed to do:

    PHONEMIZER_ESPEAK_LIBRARY= C:\Program Files\eSpeak NG\libespeak-ng.dll without the x86

  29. StephanAkkerman commented on Jan 28, 2026

    @StephanAkkerman

    Can confirm that the following works for me on Windows 11:

    import os
    
    from phonemizer import phonemize
    
    os.environ["PHONEMIZER_ESPEAK_LIBRARY"] = "C:\Program Files\eSpeak NG\libespeak-ng.dll"
    
    text = "chat"
    # backend='espeak' is standaard
    ipa = phonemize(text, language="fr-fr", backend="espeak", strip=True)
    print(ipa)  # Output: ʃa
  30. PeppyMeow commented on Feb 2, 2026

    @PeppyMeow

    for windows user, visit
    https://github.com/espeak-ng/espeak-ng/releases/
    and download the latest [espeak-ng.msi]
    (https://github.com/espeak-ng/espeak-ng/releases/download/1.52.0/espeak-ng.msi)

    after that,open power shell with admin right,and execute these four commands:

    $env:PHONEMIZER_ESPEAK_LIBRARY = "c:\Program Files\eSpeak NG\libespeak-ng.dll"
    $env:PHONEMIZER_ESPEAK_PATH = "c:\Program Files\eSpeak NG"
    setx PHONEMIZER_ESPEAK_LIBRARY "c:\Program Files\eSpeak NG\libespeak-ng.dll"
    setx PHONEMIZER_ESPEAK_PATH "c:\Program Files\eSpeak NG"

    it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions