Cross-platform speech synthesis

A forum to share your demonstrations stacks, fun stacks, games, etc.
Post Reply
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Cross-platform speech synthesis

Post by tperry2x »

You can mainly use revSpeak on MacOs and Windows, so this stack does just that. It's little more than a demo of what's already included in the IDE, as far as MacOS and Windows are concerned.

Where it's useful though, is if you want to do speech synthesis on Linux.
(download link 9.8MB appimage)
screenshot.png
screenshot.png (19.67 KiB) Viewed 3314 times
Why bother? I'm just trying to give a comparable set of features across MacOS, Windows and Linux.

So far we have:
Video working on all 3,
Sound working on all 3,
and now Speech synthesis working on all 3.

(* when I mention 'all 3', I mean Linux, Windows and MacOS.)
The point of this is so one platform isn't disadvantaged heavily over the other.
The only thing I'm really missing now is browser-widget-support for Linux.
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Cross-platform speech synthesis

Post by OpenXTalkPaul »

tperry2x wrote: Sun Nov 24, 2024 10:02 pm Where it's useful though, is if you want to do speech synthesis on Linux.
(download link 9.8MB appimage)

screenshot.png

Why bother? I'm just trying to give a comparable set of features across MacOS, Windows and Linux.
I agree with this so much that two years ago I built an extension that uses the same library that your .appImage contains — eSpeak: https://github.com/OpenXTalk-org/OpenXTalk-eSpeak That should be usuable on Linux (and Windows) if the library is included or installed, but I built and tested this on macOS (using Homebrew to build eSpeak for macOS).
I like the idea of using a Linux .appImage running in a separate process for this, mostly because eSpeak also has some language files it installs that it looks for in the users home directory. One problem is that the .appImage has to be marked executable before this will work.

Also for Mac I made this extension which uses the same older Apple speech API that revSpeak uses on Mac, but with one extra capability that it can generate speech to a sound file instead of sending it to a audio out.
https://github.com/PaulMcClernan/OpenXT ... SSpeechLib

There is also a community built AVSpeech Extension (can't find that online at the moment). AVSpeech is Apple's newer Text-to-speech API on both macOS (since around 10.7 Lion) and iOS.

Emscripten Engine (and HyperSim) can use HTML5 WebSpeech API to do TTS, you can try that out in the OXT WebPlayground

I would think it would be fairly easy to build an Android (Java-FFI) Extension that does TTS.

The commercial version from LC has a 'unified speech library' that I assume collects various TTS methods into a single extension library. I think we should have 'unified libraries' for things like that as well.

One thing about eSpeak is it sounds like 1970s text-to-speech, like a 'speak-n-spell' toy voice! There must be better sounding options for TTS on Linux, no?
User avatar
tperry2x
Posts: 3208
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Cross-platform speech synthesis

Post by tperry2x »

OpenXTalkPaul wrote: Tue Dec 10, 2024 11:32 pm One thing about eSpeak is it sounds like 1970s text-to-speech, like a 'speak-n-spell' toy voice! There must be better sounding options for TTS on Linux, no?
There was, but they are now just dead links.
I'd be happy to make an appimage of a better sounding one, if one exists.
User avatar
OpenXTalkPaul
Posts: 2633
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Cross-platform speech synthesis

Post by OpenXTalkPaul »

tperry2x wrote: Sat Dec 14, 2024 10:25 am
OpenXTalkPaul wrote: Tue Dec 10, 2024 11:32 pm One thing about eSpeak is it sounds like 1970s text-to-speech, like a 'speak-n-spell' toy voice! There must be better sounding options for TTS on Linux, no?
There was, but they are now just dead links.
I'd be happy to make an appimage of a better sounding one, if one exists.
There may be TTS voice built into the CEF engine (but I could be wrong).
I believe Java has its own speech synthesis as well (TTS works in OpenXION).
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest