fixes before first PyPI release

pull/10/head
Eren Gölge 2021-01-25 11:16:20 +01:00
parent 58f6b34f8b
commit 60c1bb93d9
4 changed files with 33 additions and 25 deletions

View File

@ -141,20 +141,21 @@ Some of the public datasets that we successfully applied TTS:
## Example: Synthesizing Speech on Terminal Using the Released Models.
TTS provides a CLI interface for synthesizing speech using pre-trained models. You can either use your own model or the release models under the TTS project.
After the installation, TTS provides a CLI interface for synthesizing speech using pre-trained models. You can either use your own model or the release models under the TTS project.
Listing released TTS models.
```./TTS/bin/synthesize.py --list_models```
```tts --list_models```
Run a tts and a vocoder model from the released model list. (Simply copy and paste the full model names from the list as arguments for the command below.)
```./TTS/bin/synthesize.py --text "Text for TTS" --model_name "<type>/<language>/<dataset>/<model_name>" --vocoder_name "<type>/<language>/<dataset>/<model_name>" --output_path```
```tts --text "Text for TTS" --model_name "<type>/<language>/<dataset>/<model_name>" --vocoder_name "<type>/<language>/<dataset>/<model_name>" --output_path```
Run your own TTS model (Using Griffin-Lim Vocoder)
```./TTS/bin/synthesize.py --text "Text for TTS" --model_path path/to/model.pth.tar --config_path path/to/config.json --out_path output/path/speech.wav```
```tts --text "Text for TTS" --model_path path/to/model.pth.tar --config_path path/to/config.json --out_path output/path/speech.wav```
Run your own TTS and Vocoder models
```./TTS/bin/synthesize.py --text "Text for TTS" --model_path path/to/config.json --config_path path/to/model.pth.tar --out_path output/path/speech.wav --vocoder_path path/to/vocoder.pth.tar --vocoder_config_path path/to/vocoder_config.json```
```tts --text "Text for TTS" --model_path path/to/config.json --config_path path/to/model.pth.tar --out_path output/path/speech.wav --vocoder_path path/to/vocoder.pth.tar --vocoder_config_path path/to/vocoder_config.json```
**Note:** You can use ```./TTS/bin/synthesize.py``` if you prefer running ```tts``` from the TTS project folder.
## Example: Training and Fine-tuning LJ-Speech Dataset
Here you can find a [CoLab](https://gist.github.com/erogol/97516ad65b44dbddb8cd694953187c5b) notebook for a hands-on example, training LJSpeech. Or you can manually follow the guideline below.

View File

@ -23,7 +23,7 @@ def str2bool(v):
raise argparse.ArgumentTypeError('Boolean value expected.')
if __name__ == "__main__":
def main():
# pylint: disable=bad-continuation
parser = argparse.ArgumentParser(description='''Synthesize speech on command line.\n\n'''
@ -216,3 +216,7 @@ if __name__ == "__main__":
out_path = os.path.join(args.out_path, file_name)
print(" > Saving output to {}".format(out_path))
synthesizer.save_wav(wav, out_path)
if __name__ == "__main__":
main()

View File

@ -9,6 +9,8 @@ Instructions below are based on a Ubuntu 18.04 machine, but it should be simple
##### Using server.py
If you have the environment set already for TTS, then you can directly call ```server.py```.
**Note:** After installing TTS as a package you can use ```tts-server``` to call the commands below.
Examples runs:
List officially released models.

View File

@ -33,22 +33,8 @@ args, unknown_args = parser.parse_known_args()
# Remove our arguments from argv so that setuptools doesn't see them
sys.argv = [sys.argv[0]] + unknown_args
version = '0.0.9'
# Adapted from https://github.com/pytorch/pytorch
version = '0.0.9a0'
cwd = os.path.dirname(os.path.abspath(__file__))
if os.getenv('TTS_PYTORCH_BUILD_VERSION'):
version = os.getenv('TTS_PYTORCH_BUILD_VERSION')
else:
try:
sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'],
cwd=cwd).decode('ascii').strip()
version += '+' + sha[:7]
except subprocess.CalledProcessError:
pass
except IOError: # FileNotFoundError for python 3
pass
# Handle Cython code
def find_pyx(path='.'):
@ -108,9 +94,11 @@ def pip_install(package_name):
reqs_from_file = open('requirements.txt').readlines()
# reqs_without_tf = [r for r in reqs_from_file if not r.startswith('tensorflow')]
# tf_req = [r for r in reqs_from_file if r.startswith('tensorflow')]
# requirements = {'install_requires': reqs_without_tf, 'pip_install': tf_req}
with open('README.md', "r", encoding="utf-8") as readme_file:
README = readme_file.read()
setup(
name='TTS',
version=version,
@ -118,8 +106,8 @@ setup(
author='Eren Gölge',
author_email='egolge@mozilla.com',
description='Text to Speech with Deep Learning',
# long_description=README,
license='MPL-2.0',
entry_points={'console_scripts': ['tts-server = TTS.server.server:main']},
ext_modules=find_cython_extensions(),
packages=find_packages(include=['TTS*']),
project_urls={
@ -134,17 +122,30 @@ setup(
},
install_requires=reqs_from_file,
python_requires='>=3.6.0',
entry_points={
'console_scripts': [
'tts=TTS.bin.synthesize:main',
'tts-server = TTS.server.server:main'
]
},
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
'Development Status :: 3 - Alpha',
"Intended Audience :: Science/Research :: Developers",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Operating System :: POSIX :: Linux",
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
"Topic :: Software Development :: Libraries :: Python Modules :: Speech :: Sound/Audio :: Multimedia :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Multimedia :: Sound/Audio :: Speech",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
])
# for some reason having tensorflow in 'install_requires'