Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
67 lines (59 loc) · 2.38 KB
/
Copy pathsetup.py
File metadata and controls
67 lines (59 loc) · 2.38 KB
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
57
58
59
60
61
62
63
64
65
66
67
import numpy
from setuptools import Extension, find_packages, setup
from setuptools.command.build_ext import build_ext
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
**This is an unofficial republication of
[lumaku/ctc-segmentation](https://github.com/lumaku/ctc-segmentation) maintained
by the ESPnet project. It is not affiliated with, nor endorsed by, the original
authors.** It exists only because upstream's released 1.7.4 builds against the
NumPy 1.x ABI and so fails to import under NumPy 2 - a problem upstream has
already fixed on `master` but has not released. The import name is unchanged.
See [FORK_NOTICE.md](https://github.com/espnet/ctc-segmentation/blob/master/FORK_NOTICE.md).
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.
"""
setup(
name="espnet-ctc-segmentation",
version="1.7.4.post1",
python_requires=">=3.9",
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 <ludwig.kuerzinger@tum.de>, "
"Dominik Winkelbauer <dominik.winkelbauer@tum.de>",
description="CTC segmentation to align utterances within "
"large audio files (ESPnet fork).",
maintainer="ESPnet Developers",
url="https://github.com/lumaku/ctc-segmentation",
project_urls={
"Original project": "https://github.com/lumaku/ctc-segmentation",
"Source (this fork)": "https://github.com/espnet/ctc-segmentation",
"Fork notice": "https://github.com/espnet/ctc-segmentation"
"/blob/master/FORK_NOTICE.md",
},
long_description_content_type="text/markdown",
long_description=package_information,
)