music.setup_engine

music.setup_engine(method='http')[source]

Clone the eCantorix repository into the user’s cache directory.

The engine is a Perl program driving espeak through a Makefile, so it is cloned rather than installed from PyPI, and it needs git, make, perl and espeak on the system. Set $MUSIC_ECANTORIX_DIR to choose a different location.

Parameters:
method{‘http’, ‘ssh’}

How to reach GitHub.

Returns:
str

The engine directory, whether it was just cloned or already present.

Raises:
ValueError

If method is not ‘http’ or ‘ssh’.

RuntimeError

If a required external program is missing, or the clone fails.