-
Notifications
You must be signed in to change notification settings - Fork 29
/
setup.py
56 lines (46 loc) · 1.58 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from setuptools import setup, find_packages, Extension
from setuptools.command.build_ext import build_ext
import numpy
try:
from Cython.Build import cythonize
USE_CYTHON = True
except ImportError:
USE_CYTHON = False
# https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html
ext = '.pyx' if USE_CYTHON else '.c'
extensions = [
Extension(
name="ctc_segmentation.ctc_segmentation_dyn",
sources=["ctc_segmentation/ctc_segmentation_dyn"+ext],
include_dirs=[numpy.get_include()],
)
]
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions)
package_information = """
# CTC segmentation
CTC segmentation is used to align utterances within audio files.
It can be combined with CTC-based ASR models.
This package includes the core functions.
https://github.com/lumaku/ctc-segmentation
"""
setup(
name="ctc_segmentation",
version="1.7.4",
python_requires='>=3.6',
packages=find_packages(exclude=["tests"]),
setup_requires=["numpy"],
install_requires=["setuptools", "numpy", "Cython"],
tests_require=["pytest", "torch"],
zip_safe=False,
ext_modules=extensions,
cmdclass={'build_ext': build_ext},
author="Ludwig Kuerzinger <[email protected]>, "
"Dominik Winkelbauer <[email protected]>",
description="CTC segmentation to align utterances within "
"large audio files.",
url="https://github.com/lumaku/ctc-segmentation",
long_description_content_type="text/markdown",
long_description=package_information,
)