style: run pre-commit

Automatic changes from: pre-commit run --all-files
This commit is contained in:
Enno Hermann 2024-05-07 19:44:38 +02:00
parent 5cf1d41555
commit ec50006855
49 changed files with 85 additions and 100 deletions

1
.github/stale.yml vendored
View File

@ -15,4 +15,3 @@ markComment: >
for your contributions. You might also look our discussion channels.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

View File

@ -41,4 +41,3 @@ COPY . /root
# Installing the TTS package itself:
RUN make install

View File

@ -14,15 +14,15 @@ import importlib.metadata
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath("../.."))
# mock deps with system level requirements.
autodoc_mock_imports = ["soundfile"]
# -- Project information -----------------------------------------------------
project = 'TTS'
project = "TTS"
copyright = "2021 Coqui GmbH, 2020 TTS authors"
author = 'Coqui GmbH'
author = "Coqui GmbH"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -38,32 +38,34 @@ master_doc = "index"
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.autosectionlabel',
'myst_parser',
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.autosectionlabel",
"myst_parser",
"sphinx_copybutton",
"sphinx_inline_tabs",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'TODO/*']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "TODO/*"]
source_suffix = [".rst", ".md"]
myst_enable_extensions = ['linkify',]
myst_enable_extensions = [
"linkify",
]
# 'sphinxcontrib.katex',
# 'sphinx.ext.autosectionlabel',
@ -74,17 +76,17 @@ myst_enable_extensions = ['linkify',]
# duplicated section names that are in different documents.
autosectionlabel_prefix_document = True
language = 'en'
language = "en"
autodoc_inherit_docstrings = False
# Disable displaying type annotations, these can be very verbose
autodoc_typehints = 'none'
autodoc_typehints = "none"
# Enable overriding of function signatures in the first line of the docstring.
autodoc_docstring_signature = True
napoleon_custom_sections = [('Shapes', 'shape')]
napoleon_custom_sections = [("Shapes", "shape")]
# -- Options for HTML output -------------------------------------------------
@ -92,7 +94,7 @@ napoleon_custom_sections = [('Shapes', 'shape')]
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'furo'
html_theme = "furo"
html_tite = "TTS"
html_theme_options = {
"light_logo": "logo.png",
@ -101,18 +103,18 @@ html_theme_options = {
}
html_sidebars = {
'**': [
"sidebar/scroll-start.html",
"sidebar/brand.html",
"sidebar/search.html",
"sidebar/navigation.html",
"sidebar/ethical-ads.html",
"sidebar/scroll-end.html",
]
}
"**": [
"sidebar/scroll-start.html",
"sidebar/brand.html",
"sidebar/search.html",
"sidebar/navigation.html",
"sidebar/ethical-ads.html",
"sidebar/scroll-end.html",
]
}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

View File

@ -111,4 +111,3 @@ them and fine-tune it for your own dataset. This will help you in two main ways:
--coqpit.run_name "glow-tts-finetune" \
--coqpit.lr 0.00001
```

View File

@ -61,5 +61,3 @@ Currently we provide the following pre-configured architectures:
.. autoclass:: TTS.tts.configs.fast_speech_config.FastSpeechConfig
:members:
```

View File

@ -59,5 +59,3 @@ If you have a limited VRAM, then you can try using the Guided Attention Loss or
.. autoclass:: TTS.tts.configs.tacotron2_config.Tacotron2Config
:members:
```

View File

@ -1,15 +1,11 @@
dependencies = [
'torch', 'gdown', 'pysbd', 'gruut', 'anyascii', 'pypinyin', 'coqpit', 'mecab-python3', 'unidic-lite'
]
dependencies = ["torch", "gdown", "pysbd", "gruut", "anyascii", "pypinyin", "coqpit", "mecab-python3", "unidic-lite"]
import torch
from TTS.utils.manage import ModelManager
from TTS.utils.synthesizer import Synthesizer
def tts(model_name='tts_models/en/ljspeech/tacotron2-DCA',
vocoder_name=None,
use_cuda=False):
def tts(model_name="tts_models/en/ljspeech/tacotron2-DCA", vocoder_name=None, use_cuda=False):
"""TTS entry point for PyTorch Hub that provides a Synthesizer object to synthesize speech from a give text.
Example:
@ -28,19 +24,20 @@ def tts(model_name='tts_models/en/ljspeech/tacotron2-DCA',
manager = ModelManager()
model_path, config_path, model_item = manager.download_model(model_name)
vocoder_name = model_item[
'default_vocoder'] if vocoder_name is None else vocoder_name
vocoder_name = model_item["default_vocoder"] if vocoder_name is None else vocoder_name
vocoder_path, vocoder_config_path, _ = manager.download_model(vocoder_name)
# create synthesizer
synt = Synthesizer(tts_checkpoint=model_path,
tts_config_path=config_path,
vocoder_checkpoint=vocoder_path,
vocoder_config=vocoder_config_path,
use_cuda=use_cuda)
synt = Synthesizer(
tts_checkpoint=model_path,
tts_config_path=config_path,
vocoder_checkpoint=vocoder_path,
vocoder_config=vocoder_config_path,
use_cuda=use_cuda,
)
return synt
if __name__ == '__main__':
synthesizer = torch.hub.load('coqui-ai/TTS:dev', 'tts', source='github')
if __name__ == "__main__":
synthesizer = torch.hub.load("coqui-ai/TTS:dev", "tts", source="github")
synthesizer.tts("This is a test!")

View File

@ -4,4 +4,3 @@ BASEDIR=$(dirname "$0")
echo "$BASEDIR"
# run training
CUDA_VISIBLE_DEVICES="" python TTS/bin/compute_statistics.py --config_path $BASEDIR/../inputs/test_glow_tts.json --out_path $BASEDIR/../outputs/scale_stats.npy

View File

@ -98,5 +98,3 @@
"gst_style_tokens": 10
}
}

View File

@ -21,4 +21,3 @@
"do_trim_silence": false
}
}

View File

@ -163,4 +163,3 @@
// PATHS
"output_path": "tests/train_outputs/"
}

View File

@ -113,4 +113,3 @@
// PATHS
"output_path": "tests/train_outputs/"
}

View File

@ -109,4 +109,3 @@
// PATHS
"output_path": "tests/train_outputs/"
}