diff --git a/README.md b/README.md index 2fd24f7..06a7f8b 100644 --- a/README.md +++ b/README.md @@ -63,17 +63,37 @@ conda activate tts pip install -r requirements.txt ``` -## Language-specific dependencies +### Language-specific setup -There are language-specific python dependencies. For example, if you will use Chinese voices (see [voices usage](#voices)), please install the requirements `requirements-zh.txt` ... supporting more languages is still a work in progress. +There are language-specific python dependencies. + +For example, if you will use Chinese voices (see [voices usage](#voices)), please install the requirements `requirements-zh.txt` ... supporting more languages is still a work in progress. ```bash +# Before using zh-* prefixed voices... pip install -r requirements-zh.txt -## then you can use zh-prefixed voices for Chinese texts: +## then you can use voices for Chinese texts: python tts.py -v zf_xiaoni "事实胜于雄辩" + +## Before using jp-* prefixed voices... +pip install -r requirements-jp.txt + +## then you can use voices for Japanese texts: +python tts.py -v jf_alpha "言い習わし" + ``` +Please also read the requirements text file for the language you want to use, as there may be additional instructions there. For example, using Japanese you may want to choose a dictionary and initialize a configuration file. + +| Language | lang_code | voice prefix | requirements file | +| -------- | --------- | ------------ | ------------------- | +| Chinese | 'z' | 'zh' | requirements-zh.txt | +| Japanese | 'j' | 'jp' | requirements-jp.txt | + +> [!Note] +> You can read more about using different voices in the [Voices](#voices) secton. + ### Intel XPU environmental variables (Optional) For XPUs, we need to set some environmental variables. I have added a `env.sh` script which will activate the conda environment `tts` and set the environmental variables. diff --git a/requirements-jp.txt b/requirements-jp.txt new file mode 100644 index 0000000..5125f68 --- /dev/null +++ b/requirements-jp.txt @@ -0,0 +1,11 @@ +# for jp +# ...if you get an error about missing 'mecabrc' file, just create an empty file with the reported name and location + +pyopenjtalk +jaconv +mojimoji +mecab-python3 + +# A dictionary is needed, you may choose to install the lite or full version +fugashi[unidic-lite] +# fugashi[unidic]