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

RuntimeError: Unknown qengine #3

Open
king-dahmanus opened this issue Apr 18, 2022 · 3 comments
Open

RuntimeError: Unknown qengine #3

king-dahmanus opened this issue Apr 18, 2022 · 3 comments

Comments

@king-dahmanus
Copy link

first of all, before the actual issue, I'd like to suggest adding a requirements.txt file for pip to avoid having to install each lib after encountering an error that it's not found. Now, the actual issue, I got it from torch when it was trying to load glados.pt, from the serialization.py line 162, I'll try to copy the errors.
Traceback (most recent call last): File "C:\Users\ilyes\Desktop\glados-tts\glados.py", line 9, in glados = torch.jit.load('models/glados.pt') File "D:\python3\envs\glados\lib\site-packages\torch\jit_serialization.py", line 162, in load cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files) RuntimeError: Unknown qengine
hope I can fix it and try the model out with my cpu, and also please add instructions for us to train our own models with our own voice/datasets, thanks, and I'm excited to see this thing grow to be super fast even on a junky cpu like the celeron 3060 that I have

R2D2FISH pushed a commit that referenced this issue Aug 24, 2022
Created Remote engine for Glados TTS
@R2D2FISH
Copy link
Owner

R2D2FISH commented Nov 9, 2022

Wow I haven't checked on this repo in a looong time. So sorry I never saw this. The "vocoder-cpu-hq.pt" and lq.pt are optimized for CPU inference. Note that the low quality model sounds considerably worse. I can run this model on my CPU without issues. Perhaps you are running an older version of pytorch? Unfortunately if you are running a Celeron 3060 I don't think you'll be able to train your own model :(. You need a fast CPU and a GPU with at least 12 or so GB of VRAM. I personally used a laptop with an RX6800M (back before that GPU was even officially capable of training NN's!) which has 12GB of VRAM. Regardless, Forward Tacotron is trained in two stages. First, a normal Tacotron model is trained, and then features from that model are used to teach a second model which does not use traditional "attention". This is what allows this TTS to produce passages of pretty much infinite length without becoming word salad. Basically, I trained the normal Tacotron model on pure LJSpeech until it sounded coherent, and then swapped the dataset for a set made of every GLaDOS voice line from Portal 2. Eventually, it began sounding like GLaDOS. I then used this data to train Forward Tacotron. Even with just 600 audio clips, the model turned out quite good. Since Forward Tacotron is not expected to "learn" the rhythm and spacing of the spacing of the syllables from nothing (Tacotron provides them), it allows it to work with much smaller datasets. It basically just has to figure out the rhythm and timbre of a speaker rather than comprehend the whole English language first (fun fact: the first tacotron model was not even provided phonemes! It had to learn pronunciation all by itself!) With even smaller datasets, one possible method to use might be to transfer learn with the first tacotron, then generate all of ljspeech using this TTS, train Forward Tacotron using that data until the speech is coherent, and then finetune it with the original recordings.
Forward Tacotron is extremely fast. Most of the slowdown is in the vocoder actually.

@R2D2FISH
Copy link
Owner

R2D2FISH commented Nov 9, 2022

Another important thing to note when training your own models is that punctuation is actually extremely important. The stock GLaDOS voice dataset does not have punctuation. I had to add it manually. Makes a HUGE difference.

benediktkr referenced this issue in benediktkr/glados-tts May 13, 2023
…ript (VRCWizard#3)

changing tabs to spaces

use pysoundfile instead of scipy

standard python structure

cleanup of README

housekeeping and python formatting

glados tts engine made pythonic

switch from flask to fastapi

update README to reflect current work

update lockfile

update README to reflect current work

link to Ellen McClain's wikipedia page

remove clutter

Co-authored-by: Ben Kristinsson <[email protected]>
Reviewed-on: https://git.sudo.is/b/glados-tts/pulls/3
R2D2FISH pushed a commit that referenced this issue Oct 2, 2023
Created Remote engine for Glados TTS

Former-commit-id: c645589
@neuron-whisperer
Copy link

neuron-whisperer commented Dec 2, 2024

I spent some time trying to get this working on macOS. The problem is that even if espeak-ng is installed (via brew), the library can't find it without the environment $PHONEMIZER_ESPEAK_LIBRARY being set.

Two ways to fix this:

  1. Add this line to .bashrc/.zshrc or run it in your shell before running glados.py:

export PHONEMIZER_ESPEAK_LIBRARY=/opt/homebrew/Cellar/espeak/1.48.04_1/lib/libespeak.dylib

  1. Add these lines to the top of glados.py:
import os
os.environ['PHONEMIZER_ESPEAK_LIBRARY'] = '/opt/homebrew/Cellar/espeak/1.48.04_1/lib/libespeak.dylib'

I'm sure that R2D2FISH could update glados.py to implement the second option automatically if it's running in macOS.

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

3 participants