coqui-ai / STT

🐸STT - The deep learning toolkit for Speech-to-Text. Training and deploying STT models has never been so easy.
https://coqui.ai
Mozilla Public License 2.0
2.27k stars 275 forks source link

Feature request: pkg-config file #2147

Open philn opened 2 years ago

philn commented 2 years ago

Hi!

I've been working on a GStreamer plugin wrapping STT. For linux targets at least, it would be very convenient to have a pkg-config file, that's quite the standard way nowadays to integrate in 3rd-party build systems. Would it be possible to provide one? I'm not sure Bazel can do this, I'm not familiar with that.

My WIP plugin is: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1749 ... The goal would be to get rid of the hacky coqui-native-client-dir meson option I added there for now.

reuben commented 2 years ago

Hey @philn, thanks for reaching out, the GStreamer integration looks very cool! Traditionally people have bundled the pre-built binaries into their applications, would this be an option for the GStreamer plugin? Alternatively if you can provide a simple pkg-config file that just expands into -lstt I'm happy to merge. I guess we'd also need a way to install things to a user-defined (potentially system-wide) prefix.

philn commented 2 years ago

Bundling pre-built binaries can be done by downstream users yes. For upstream ideally we'd like to rely on some distro packages for CI, but anyway, maybe for this specific case we could do an exception and have our CI download pre-built binaries. That will require discussion with the rest of the GStreamer maintainers :)

The thing about a pkg-config file is that it hardcodes paths to headers and libs, so shipping a static one with your current releases doesn't make much sense I'm afraid. I was more thinking about generating one as part of the build-from-sources workflow.

reuben commented 2 years ago

Maybe we can generate the file here and install it as well: https://github.com/coqui-ai/STT/blob/e366f9663aade14ebd440cf132706866fd2c58d0/native_client/Makefile#L33-L39

philn commented 2 years ago

Hm yes, that looks like a valid approach indeed!