tazz4843 / coqui-stt

Safe wrapper around the Coqui STT C library
108 stars 9 forks source link

Fix windows-specific issues #8

Closed Bear-03 closed 2 years ago

Bear-03 commented 2 years ago

This PR goes in tandem with this one in coqui-stt-sys to fix the same issues.

In that PR, new link attributes were added, so adding them manually in build.rs is not needed anymore.

Also, instead of adding C:\stt to the library search paths manually in build.rs, the same effect can be achieved by adding a library folder to the PATH env variable, which is the common solution to having global libraries on windows. If the developer doesn't want to change path, they can always create their own build.rs and add their own library search directory.

Lastly, as mentioned in the coqui-stt-sys PR, some bindings are not available on windows, so their high-level equivalents should also be removed.

tazz4843 commented 2 years ago

Whoops sorry this took so long for me to see. This looks pretty good, I'll look into it closer once I get home in a few hours.

Bear-03 commented 2 years ago

Awesome! By the way, I didn't do it myself because I wanted to discuss it with you, but maybe a README section talking about how to add the libraries on windows (PATH or custom search path in build.rs) would be a good idea.

Also, I wasn't able to test it on linux. I don't see why it wouldn't work, but it's best to test it just in case ;)

tazz4843 commented 2 years ago

Hmm yeah that'd be a good idea. If you want to add some stuff to the README for Windows, that'd be great as well.

The checks themselves run on Linux runners and they seem to work fine, so it should work fine on Linux in general.

tazz4843 commented 2 years ago

Just ran a Linux test, works fine. Let me know if you want to add the stuff to the README or not (for win), and I'll merge it.

Bear-03 commented 2 years ago

Yup, I'll push a new commit when I get some time tomorrow.

tazz4843 commented 2 years ago

Alright, thanks!

Bear-03 commented 2 years ago

That should be it! Let me know if you want me to add or clarify anything :D