wustho / epy

CLI Ebook (epub2, epub3, fb2, mobi) Reader
GNU General Public License v3.0
962 stars 52 forks source link

Use mimic instead of pico2wave. #44

Closed mcepl closed 2 years ago

mcepl commented 2 years ago

Unfortunately, the language setting is gone again.

Fixes #42

wustho commented 2 years ago

Hey there, just read this PR, looks good... But need to test it on my machine first... Thanks

mcepl commented 2 years ago

Thinking about this, I wonder whether we shouldn’t use speechd instead: it is back-end independent and Firefox uses it on Linux, so it should be sufficiently widespread. spd-say is the command, and spd-say -e can read text from stdin as well.

wustho commented 2 years ago

Hey there, @mcepl , sure but hold up a bit... I kinda have some thoughts about tts engine, I will merge this first (after testing), and put my thoughts and will ping you later to discuss the engine...

wustho commented 2 years ago

@mcepl Hello there, I just add SpeakerBaseModel if developers are interested in adding their fav tts engine, you can check the example of how to use it in https://github.com/wustho/epy/blob/master/epy.py#L107

Cheers!

mcepl commented 2 years ago

That looks really great! I guess the configuration is PreferredTTSEngine with value from cmd class attribute?

Oh! Does it do auto-discovery? Great!

wustho commented 2 years ago

I guess the configuration is PreferredTTSEngine with value from cmd class attribute?

Yes, it is!

Oh! Does it do auto-discovery? Great!

It should, but need to define available attribute (other than registering speaker config object to SPEAKERS global var), because some tts engine like pico2wave needs dependency like play.