ImperialSquid / zotero-zotts

A Zotero plugin to add TTS functionality to the PDF viewer
GNU Affero General Public License v3.0
68 stars 1 forks source link

[Bug]: Failed to load TTS engines #98

Open delargewiu opened 2 weeks ago

delargewiu commented 2 weeks ago

Checklist

Zotero version

7.0.3

ZoTTS version

1.2.1

OS

Linux

OS (specific)

Linux Mint 22 Cinnamon 6.2.9, Linux Kernel 6.8.0-40-generic

Steps to reproduce

  1. Installed the ZoTTS plugin
  2. Close and open Zotero

Expected behaviour

Open with ZoTTS GUI buttons available

Actual behaviour

Zotero opens with a dialog box that states, "ZoTTS, ERROR: ZoTTS failed to load TTS engines. Please submit a bug report for assistance." The GUI buttons for ZoTTS are also missing. This issue is identical on two different computers running the above-stated operating system.

ImperialSquid commented 2 weeks ago

Hi @delargewiu, thanks for your bug report!

Can you try going to this website and confirming if you see any voices listed in the dropdown?

If you don't see any voices it means you don't have a way to do TTS on your machines. You'll need to install speech-dispatcher as well as some kind of engine like espeak.

HynDuf commented 2 weeks ago

I got the same bug too (after trying to install it for the first time). And there are 6 voices listed in the dropdown normally for me.

I used Zotero 7.0 on NixOS btw (zotero --version gave Zotero Zotero 115.9.1esr)

ImperialSquid commented 2 weeks ago

@HynDuf due to the different distros I'll sort this in a new issue (it may be that the solutions end up being the same but just to not confuse things keeping them as separate seems easier)

ImperialSquid commented 2 weeks ago

@delargewiu

Also, are you using Zotero in flatpak/some other sandboxed environment?

As mentioned in this issue (comment), Firefox (which Zotero is based on) was missing support for speech-dispatcher until version 123 (Z7 is based on v115 ESR)

delargewiu commented 1 week ago

@ImperialSquid

I had Zotero installed using apt from a repository. I purged that and am now running from the extracted tarball as described on the Zotero website. Issue was still there. I was able to go to the website and see the voices and use the tool. Still had the issue. My system did have speech-dispatcher but not espeak so I installed it. I still have the issue.

ImperialSquid commented 1 week ago

Hmmm, annoying that it wasn't an easy fix but oh well lol

In Zotero, from the top menu bar, go to Tools > Developer > Error Console, then paste the following code in and run it:

var utt = new window.SpeechSynthesisUtterance("test")
utt.onstart = () => {console.log("start")}
utt.onend = () => {console.log("end")}
utt.onerror = (error) => {console.log(error.error)}
window.speechSynthesis.speak(utt)

Let me know what output you see, may need to give it a couple of seconds for something to show up

Future versions of ZoTTS will have better error reporting ZoTTS should have better error reporting in the latest version, if you see a cause in the popup, you can also let me know what that says