espeak-ng / espeak-ng

eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
GNU General Public License v3.0
4.14k stars 889 forks source link

Licensing question regarding linking #908

Open iUltimateLP opened 3 years ago

iUltimateLP commented 3 years ago

Hey!

First of all, I'd like to thank you for the fantastic work with this repo, it's brilliant and super nice to use!

I am currently working on a adventure puzzle game based on Unreal Engine 4, and I'm currently implementing robots into the game, which can speak. For the robot voice, I'd love to use espeak-ng, as it provides the best interface and the smallest file size, which makes it super cool to use for a video game. Also it's capability to have it asynchronously generate data and return it to a callback makes it super nice to integrate into an existing audio system.

The only problem currently is licensing. espeak-ng is released under the GPL-v3 license, which states that if I'm using a library like espeak-ng, I need to open up the source code of the project containing it as well. Since the game is a commercial project, and also the developers of the Unreal Engine forbid this, I can't explicitly use it. This also applies to linking against the library, both statically and dynamically.

I know that there are good reasons to retain the safety GPL offers, but would it be possible to acquire a GPL Linking Exception (https://en.m.wikipedia.org/wiki/GPL_linking_exception)?

That way, GPL could be kept, but it'd allow developers in situations like this to link against the library without the need to open up the whole project. Obviously, credit, and potential forks of the library, containing changes needed, would still be made available for the public, and I'd love to put in the game's credits that I proudly use espeak-ng.

Let me know what you think and whether that is a possibility! Cheers!

valdisvi commented 3 years ago

Simple explanation of GPL-v3 states: "Any modifications to or software including (via compiler) GPL-licensed code must also be made available under the GPL along with build & install instructions." If you don't want to open code of your application, technologically easiest and legally correct way is to use unmodified, stand-alone eSpeak NG through its CLI interface. Calling its unmodified API from separate thread/process can also be legally correct. Of course, any modifications/additions you may need in eSpeak NG should be made public. In best way — as improvements in original eSpeak NG project, but you may maintain your own fork if you think it is worth effort.

iUltimateLP commented 3 years ago

Ah, thanks for the response! So I may maintain my own fork of the project, but I still can't link that against my game project without the nessecity to make my game open-source too, right?

valdisvi commented 3 years ago

Everything you modify, compile, link and build together should be open sourced with GPL-v3 license. But nobody limits you to use unmodified project. You may also look at Google's guide to the open source licenses.

iUltimateLP commented 3 years ago

I see, thanks. So there is no plan to add a linking exception to the license? I see that there a good reasons to have a GPL license, but eSpeak NG could be a great tool in the game dev world too if we'd be allowed to link against the library. A CLI/pipe solution with the unmodified executable of the project is not very optimal unfortunately as it can be unstable and it depends on other user-dependant factors (IO speed, num of threads, ...) that we can't assume.

rhdunn commented 3 years ago

As we are not able to contact the original developer of eSpeak (Johnathan Duddington), it is not possible to modify the license for the existing codebase, including adding exceptions.

However, a possibility would be for you to make use of the SAPI interface on Windows. The implementation of that for espeak-ng is currently experimental, so if you were to improve it that would be awesome. See #7 for a tracker for the current state of the SAPI support. One of the main challenges/difficulties is figuring out how best to handle the voice to language logic, as my understanding is that a voice can only register as supporting a single language, and populating SAPI with a voice per language would be far from ideal. -- Ideally, there should be a single voice registered (eSpeak), where the language is determined from the requesting API calls, and the voice option (from the !v folder, and the mbrola voices) should be configurable via a settings control panel UI.

iUltimateLP commented 3 years ago

Ah, yea that makes sense. I wonder what happened to him - hopefully nothing terrible.

SAPI would be a cool idea, but unfortunately it's only available on Windows I think, and I'm planning to ship the game on other platforms too.

So I probably won't get around writing some sort of service listening to a IPC socket or something, which links to espeak. To my understanding, that service would then need to be GPL too, and I ship that with my game without having to license the game under GPL.

ultrasound1372 commented 2 years ago

@rhdunn the way it used to work is that when you ran the installer it would let you select which voices to make available, and it would make all of them in SAPI. I think this would be better done via a control panel UI yes, which would jsut re-register the voices as necessary. Don't expose all the languages by default, just the system language or what have you, but then let them select any language and voice they wish, because I really don't think there's a standard API call that most apps would be aware of to change these settings with a single voice. Perhaps you could fudge in some special SSML tag but that would be less than ideal.

lxe commented 10 months ago

Sorry to bring back this old thread, but why are there COPYING.BSD2 and COPYING.APACHE files in the source?

rhdunn commented 10 months ago
  1. COPYING -- The main license file used by most of the project code and what the project is licensed as.
  2. COPYING.APACHE -- For the android port code which is in the android folder which is licensed as Apache 2.0.
  3. COPYING.BSD2 -- For the NetBSD compat implementation of getopt for Windows.
  4. COPYING.UCD -- For the Unicode data files used in src/ucd-tools for Unicode support.