setup.py 1.8 KB
Newer Older
1
# Copyright 2024 The HuggingFace Team. All rights reserved.
sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
eustlb's avatar
eustlb committed
16

sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
17
18
19
20
import setuptools


_deps = [
eustlb's avatar
eustlb committed
21
    "transformers>=4.43.0,<=4.43.3",
sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
22
    "torch",
23
24
    "sentencepiece",
    "descript-audio-codec",
sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
25
26
27
28
29
30
31
32
]

_extras_dev_deps = [
    "black~=23.1",
    "isort>=5.5.4",
    "ruff>=0.0.241,<=0.0.259",
]

33
34
35
36
37
38
39
40
_extras_training_deps = [
    "jiwer",
    "wandb",
    "accelerate",
    "evaluate",
    "datasets[audio]>=2.14.5",
]

sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
41
42
43
44
45
46
here = os.path.abspath(os.path.dirname(__file__))

with open(os.path.join(here, "README.md"), encoding="utf-8") as f:
    long_description = f.read()

# read version
Yoach Lacombe's avatar
Yoach Lacombe committed
47
with open(os.path.join(here, "parler_tts", "__init__.py"), encoding="utf-8") as f:
sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
48
49
50
51
52
53
54
55
    for line in f:
        if line.startswith("__version__"):
            version = line.split("=")[1].strip().strip('"')
            break
    else:
        raise RuntimeError("Unable to find version string.")

setuptools.setup(
Yoach Lacombe's avatar
Yoach Lacombe committed
56
    name="parler_tts",
sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
57
    version=version,
Yoach Lacombe's avatar
Yoach Lacombe committed
58
    description="Toolkit for using and training Parler-TTS, a high-quality text-to-speech model.",
sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
59
60
61
62
63
    long_description=long_description,
    long_description_content_type="text/markdown",
    packages=setuptools.find_packages(),
    install_requires=_deps,
    extras_require={
eustlb's avatar
eustlb committed
64
65
        "dev": _extras_dev_deps,
        "train": _extras_training_deps,
sanchit-gandhi's avatar
setup  
sanchit-gandhi committed
66
67
    },
)