Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

even when espeak is installed, prosodic is unable to run on windows #62

Open
Taira-O opened this issue Mar 9, 2024 · 11 comments
Open

Comments

@Taira-O
Copy link

Taira-O commented Mar 9, 2024

Even if you use the source forge link to install espeak, you still get the error on windows that you are missing espeak. FYI espeak on windows does not have the file libespeak.dylib or libespeak.so

image

@yglory
Copy link

yglory commented Mar 26, 2024

I met the same issue. Any clues now?

@quadrismegistus
Copy link
Owner

Hm, sorry you're having this issue, guys. Are you both on Windows?

@yglory
Copy link

yglory commented Mar 26, 2024

Hm, sorry you're having this issue, guys. Are you both on Windows?

It's great you're here!
I'm on Windows11. According to the instructions, I did the following steps:

  1. installed prosodic with pip+github.
  2. There was an error when building packages. I downloaded and installed VS_BuildTools, problem solved.
  3. I installed eSpeak.
  4. When I tried to start Prosodic, this error had been raised.
  5. I supposed I had the wrong eSpeak installation, So I downloaded and installed 'espkeedit' as well.
    It still didn't work.
    I had a bunch of discussions with several AI but found nothing.
    It's really appreciated if you have any clues.

@quadrismegistus
Copy link
Owner

I don't have a Windows machine at the moment so it's a little hard for me to test, but I just asked work and I'm going to borrow a windows laptop for a while and see what I can figure out

@quadrismegistus
Copy link
Owner

In the meantime, if http://prosodic.org/ can help you for your use case (it may not!), feel free to give that a whirl

@yglory
Copy link

yglory commented Mar 26, 2024

Thank you for your patience.

I've managed to import the prosodic library by setting up the get_espeak_env function from langs.py. I downloaded the espeak Linux package and extracted the libespeak.so to circumvent the function's requirements, and it worked.

Here is the Python code I used:

import os

# Set the environment variable to the path of libespeak.so
os.environ["PATH_ESPEAK"] = os.path.join(os.getcwd(), "libespeak.so")
import prosodic

# Create a prosodic Text object and display its prosody
pa = prosodic.Text("shall we?")
pa.show()

However, I encountered some unexpected log messages:

⎾ building text with 2 words @ 2024-03-26 22:06:28,959
What is this phoneme? No features found for it: 蕛 @ 2024-03-26 22:06:32,030
What is this phoneme? No features found for it: 忙 @ 2024-03-26 22:06:32,030
What is this phoneme? No features found for it: 藧 @ 2024-03-26 22:06:32,070
│ found 1 cached stanzas @ 2024-03-26 22:06:33,188
⎿ 4.2 seconds @ 2024-03-26 22:06:33,188

The Text("shall we?") statement doesn't contain any Chinese characters, so I'm puzzled by these log entries.
There's no need for you to go through the trouble of borrowing a Windows computer. I'am going to revert to a previous version of Prosodic that doesn't require this setup. This solution works for my needs now. Thank you again for your support!

@quadrismegistus
Copy link
Owner

How bizarre, thanks for reporting this! I will see if I can recreate and see what's going on but glad you were able to find a solution for now

@yglory
Copy link

yglory commented Mar 26, 2024

It would be great if this could be resolved further, I'm really looking forward to version 2.0!

@George111222
Copy link

The codes doesn't solve the problem, prosodic cannot parse correctly.

@quadrismegistus
Copy link
Owner

quadrismegistus commented Aug 11, 2024

Hi everyone, I've spent some time on this and prosodic+espeak works for me now on Windows 11 (haven't tried others).

  1. Update prosodic:
pip install -U prosodic
  1. You'll need to install espeak-ng from https://github.com/espeak-ng/espeak-ng/releases/latest

Prosodic will look for the installed files in:

"C:\\Program Files\\eSpeak NG\\libespeak-ng.dll",
"C:\\Program Files (x86)\\eSpeak NG\\libespeak-ng.dll",
"C:\\Program Files (x64)\\eSpeak NG\\libespeak-ng.dll",
"C:\\Program Files (Arm)\\eSpeak NG\\libespeak-ng.dll",

You can also set the environment variable directly:

import os
os.environ["PATH_ESPEAK"]="C:\\my\\path\\to\\libespeak-ng.dll"
import prosodic
  1. Test it out:
import prosodic
t=prosodic.Text("goobledy gobbledy goo")
t.df

If you see an "Error: could not find mbrola.dll" error, please ignore it; it's not necessary.

I'd really appreciate if someone could test this out and see if it works for them on Windows or if any problems remain.

Thanks for your patience!

@yglory
Copy link

yglory commented Sep 2, 2024

Wow!
I will give it a try and report back if I have any problems.
Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants