Closed antrmn closed 3 months ago
ZoTTS should support any system so long as Zotero can find a TTS engine, it's possible you don't have one installed...
To make sure, can you visit this website and see if it has voices listed or not?
If the website shows no listed voices, you probably don't have any installed. I don't use Linux but I did some searching and it seems like you'll need espeak to do the actual synthesis and speech-dispatcher to bridge between Zotero and espeak.
If the website does list some voices it'll be a different issue and we can go from there...
Let me know if the above fixes your issue
I do have speech-dispatcher installed and I have piper as a backend. I see one voice called "Piper (en-US)" on the website you linked and on Firefox's reader mode TTS panel as well.
Huh, that's really weird. Zotero is built on firefox so if ff can detect the voices zotero should be able to as well...
In zotero try going to Tools > Developer > Run JavaScript and running the following: window.speechSynthesis.getVoices()
, do you see any output?
Yes, I just tried issuing that command multiple times.
window.speechSynthesis.getVoices()
Array []
window.speechSynthesis.getVoices()
Array []
window.speechSynthesis.getVoices()
Array []
window.speechSynthesis.getVoices()
Array []
AFAIK, Zotero Flatpak being kinda limited when it comes to IPC is not news: it seems that its Libreoffice integration plugin suffers from a similar issue.
What's strange is the behaviour on non-Flatpak
window.speechSynthesis.getVoices()
Array [] // Why????
window.speechSynthesis.getVoices()
Array [ SpeechSynthesisVoice ]
window.speechSynthesis.getVoices()
Array [ SpeechSynthesisVoice ]
window.speechSynthesis.getVoices()
Array [ SpeechSynthesisVoice ]
Then the voice appears and works with no issues. When restarting Zotero I need to repeat the commands above.
The non-flatpak behaviour isn't surprising, on my windows machine the first speech after restarting has a small but noticeable delay, so I would guess the webspeech api stuff is initialised as needed rather than being there all the time.
Unfortunately, between the fact that you're probably more familiar with how linux works than I am, and if what you say about the libreoffice situation is right in that it's a similar issue, that probably means it's an issue the zotero devs are best placed to help you with rather than me. Sorry I couldn't be more help...
I will just add though, even if it only uses webspeech right now, zotts was built from the very start to support multiple TTS engines (there's a guide in the contributing.md if you're curious about the structure). Adding other engines isn't an immediate priority due to demand for other features like highlighting, but just an fyi that even if you don't get a fix from the zotero devs, you might still be able to use zotts in the future.
Sorry again for not having an immediate fix for you. Let me know if you need anything else, or if that's all, I'll close the issue.
would guess the webspeech api stuff is initialised as needed rather than being there all the time.
It seems so. TTS on non-flatpak Zotero actually works and after running the TTS just once the voice do appear in the settings panel. I feel that making webspeech initialize as soon as the settings panel is opened (or just adding a "Refresh" button near the drop-down list) may eventually aid confused users like me :)
I believe the issue on flatpak is non-trivial, as Firefox Flatpak had a similar issue for quite a long time, so don't worry about it. I believe some fiddling with the permissions using Flatseal might do the trick, but at this point I might just stick with the non-Flatpak, as it was not a necessity for me.
In any case, I believe this is a good short term solution for TTS on Linux while waiting for the complete emerging of libspiel which is contributed by the same mind behind the WebSpeech API (If you're interested here's a keynote about it. Go to 04:28:26)
You can close the issue. Thank you for your help and for your time making this extension
I feel that making webspeech initialize as soon as the settings panel is opened (or just adding a "Refresh" button near the drop-down list) may eventually aid confused users like me :)
Sure! ZoTTS is definitely still a little rough around the edges in terms of possibly confusing the user...! I'll add these ideas to my list.
Happy to help and glad there was a solution in the end! Do let me know if you have any other issues/feature requests/etc
I'm using Zotero 7.0.0-beta.105+c5c613c82 from Flatpak on Linux (openSUSE Tumbleweed). I've also tried running Zotero from the latest beta tarball but the issue persists: no voice is listed.
Does zotero-tts support Linux and Flatpak?