mediatechlab / tts-wrapper

TTS-Wrapper makes it easier to use text-to-speech APIs by providing a unified and easy-to-use interface.
MIT License
14 stars 9 forks source link

Make sure extra module imports are optional #8

Open gbottari opened 2 years ago

gbottari commented 2 years ago

Prerequisites

For more information, see the contributing guide.

Description

All extra modules in pyproject.toml (section [tool.poetry.extras]) must be truly optional. For instance, PollyTTS requires boto3. If a user doesn't have boto3 installed, they should be able to use other modules (e.g. MicrosoftTTS) without needing to install boto3.

The project already works with this in mind. However, there are no tests for this yet. Maybe we can use importlib to remove an engine dependency and check if importing the TTS engine (without instantiating it) works.

willwade commented 3 months ago

I have not touched tests (tsk tsk!) in my PR #25 - apologies. But I'll try too.. and try and remeber this

willwade commented 3 months ago

https://github.com/willwade/tts-wrapper/commit/bfcaf2942e19102cedb54bb65f97d21325f9b5f5