Git Product home page Git Product logo

pysinsy's Introduction

Pysinsy

PyPI Python package License

A python wrapper for https://github.com/r9y9/sinsy.

Please notice that the package is in an alpha state. APIs will subject to change.

Notice

The package is built with the modified version of sinsy. The modified version provides the same functionality with some improvements (e.g., cmake support) but is technically different from the one from HTS working group.

Build requirements

The python package relies on cython to make python bindings for sinsy. You must need the following tools to build and install pysinsy:

  • C/C++ compilers (to build C/C++ extentions)
  • cython

Supported platforms

  • Linux
  • Mac OSX
  • Windows (MSVC)

Installation

pip install pysinsy

Development

To build the package locally, you will need to make sure to clone sinsy.

git submodule update --recursive --init

and then run

pip install -e .

Quick demo

import pysinsy

sinsy = pysinsy.Sinsy()

# Set language to Japanese
assert sinsy.setLanguages("j", pysinsy.get_default_dic_dir())
assert sinsy.loadScoreFromMusicXML("./tests/song070_f00001_063.xml")

print("Mono labels:")
is_mono = True
labels = sinsy.createLabelData(is_mono, 1, 1).getData()
for l in labels[:5]:
    print(l)

print("\nFull-context labels:")
is_mono = False
labels = sinsy.createLabelData(is_mono, 1, 1).getData()
for l in labels[:5]:
    print(l)

sinsy.clearScore()

Output:

Mono labels:
0 10909090 sil
10909090 21818181 sil
21818181 32727272 sil
32727272 43636363 pau
43636363 47727272 g

Full-context labels:
0 10909090 s@xx^xx-sil+sil=sil_xx%xx^00_00~00-1!1[xx$xx]xx/A:xx-xx-xx@xx~xx/B:1_1_1@xx|xx/C:2+1+1@JPN&0/D:xx!xx#xx$xx%xx|xx&xx;xx-xx/E:xx]xx^0=2/4~110!1@109#48+xx]1$1|0[10&0]48=0^100~xx#xx_xx;xx$xx&xx%xx[xx|0]0-n^xx+xx~xx=xx@xx$xx!xx%xx#xx|xx|xx-xx&xx&xx+xx[xx;xx]xx;xx~xx~xx^xx^xx@xx[xx#xx=xx!xx~xx+xx!xx^xx/F:A4#9#0-2/4$110$1+40%18;xx/G:xx_xx/H:xx_xx/I:12_12/J:2~2@3
10909090 21818181 s@xx^sil-sil+sil=pau_xx%00^00_00~00-1!1[xx$xx]xx/A:xx-xx-xx@xx~xx/B:1_1_1@xx|xx/C:2+1+1@JPN&0/D:xx!xx#xx$xx%xx|xx&xx;xx-xx/E:xx]xx^0=2/4~110!1@109#48+xx]1$1|0[10&0]48=0^100~xx#xx_xx;xx$xx&xx%xx[xx|0]0-n^xx+xx~xx=xx@xx$xx!xx%xx#xx|xx|xx-xx&xx&xx+xx[xx;xx]xx;xx~xx~xx^xx^xx@xx[xx#xx=xx!xx~xx+xx!xx^xx/F:A4#9#0-2/4$110$1+40%18;xx/G:xx_xx/H:xx_xx/I:12_12/J:2~2@3
21818181 32727272 s@sil^sil-sil+pau=g_00%00^00_00~00-1!1[xx$xx]xx/A:xx-xx-xx@xx~xx/B:1_1_1@xx|xx/C:2+1+1@JPN&0/D:xx!xx#xx$xx%xx|xx&xx;xx-xx/E:xx]xx^0=2/4~110!1@109#48+xx]1$1|0[10&0]48=0^100~xx#xx_xx;xx$xx&xx%xx[xx|0]0-n^xx+xx~xx=xx@xx$xx!xx%xx#xx|xx|xx-xx&xx&xx+xx[xx;xx]xx;xx~xx~xx^xx^xx@xx[xx#xx=xx!xx~xx+xx!xx^xx/F:A4#9#0-2/4$110$1+40%18;xx/G:xx_xx/H:xx_xx/I:12_12/J:2~2@3
32727272 43636363 p@sil^sil-pau+g=e_00%00^00_00~00-1!1[xx$xx]xx/A:xx-xx-xx@xx~xx/B:1_1_1@xx|xx/C:2+1+1@JPN&0/D:xx!xx#xx$xx%xx|xx&xx;xx-xx/E:xx]xx^0=2/4~110!1@109#48+xx]1$1|0[10&0]48=0^100~xx#xx_xx;xx$xx&xx%xx[xx|0]0-n^xx+xx~xx=xx@xx$xx!xx%xx#xx|xx|xx-xx&xx&xx+xx[xx;xx]xx;xx~xx~xx^xx^xx@xx[xx#xx=xx!xx~xx+xx!xx^xx/F:A4#9#0-2/4$110$1+40%18;xx/G:xx_xx/H:xx_xx/I:12_12/J:2~2@3
43636363 47727272 c@sil^pau-g+e=N_00%00^00_00~00-1!2[xx$1]xx/A:xx-xx-xx@xx~xx/B:2_1_1@JPN|0/C:1+1+1@JPN&0/D:xx!xx#xx$xx%xx|xx&xx;xx-xx/E:A4]9^0=2/4~110!1@40#18+xx]1$4|0[10&0]48=0^100~1#12_0;38$0&168%0[100|0]0-n^xx+xx~xx=xx@xx$xx!2%xx#5|xx|24-xx&xx&xx+xx[xx;xx]xx;xx~xx~xx^xx^xx@xx[xx#xx=xx!xx~xx+p0!xx^xx/F:A4#9#0-2/4$110$1+13%6;xx/G:xx_xx/H:12_12/I:11_11/J:2~2@3

pysinsy's People

Contributors

crlotwhite avatar r9y9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pysinsy's Issues

ImportError: /usr/local/lib/libsinsy.so.0.9: undefined symbol: HTS_Engine_get_nsamples

My English is bad. So I used a translator. I'm sorry.

I installed wsl2 and Ubuntu(version: 2004.2021.222.0) to use nnsvs.
Then I tried to install nnsvs using setup-nsvs-on-wsl (https://github.com/oatsu-gh/setup-nnsvs-on-wsl)), but it didn't install properly because of an error.
So I copied the commands in 'setup_nnsvs_on_wsl.sh' and entered them directly into Windows Terminal to install the necessary packages and nnsvs.
But nnsvs didn't work, and I checked and found an error when import pysinsy.

This is the result of import pysinsy:
.>>> import pysinsy
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.8/dist-packages/pysinsy/init.py", line 5, in
from .sinsy import Sinsy
ImportError: /usr/local/lib/libsinsy.so.0.9: undefined symbol: HTS_Engine_get_nsamples

I tried reinstalling Ubuntu and nnsvs several times to resolve the error, but the problem was not resolved.
Please help me to resolve this error...😢
Thank you for reading!

Original Message(Korean):
저는 nnsvs를 사용하기 위해 wsl2와 Ubuntu(버전: 2004.2021.222.0)을 설치했습니다.
그 다음 setup-nnsvs-on-wsl(https://github.com/oatsu-gh/setup-nnsvs-on-wsl)을 사용해 nnsvs 설치하려고 했지만, 오류가 났고 제대로 설치가 되지 않았습니다.
그래서 setup_nnsvs_on_wsl.sh 안의 명령어를 한 줄 씩 복사해서 Windows Terminal에 직접 입력하여 필요한 패키지들과 nnsvs를 설치했습니다.
하지만 nnsvs가 작동하지 않았고, 확인해보니 pysinsy를 import할 때 오류가 있었습니다.

아래는 pysinsy를 import한 결과입니다:
.>>> import pysinsy
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.8/dist-packages/pysinsy/init.py", line 5, in
from .sinsy import Sinsy
ImportError: /usr/local/lib/libsinsy.so.0.9: undefined symbol: HTS_Engine_get_nsamples

오류를 해결하기 위해 Ubuntu와 nnsvs를 여러번 재설치 해보았지만 문제가 해결되지 않았습니다.
제가 이 오류를 해결할 수 있도록 도와주세요...😢
읽어주셔서 감사합니다.

collect2: error: ld returned 1 exit status

fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
running develop
-- Building version 0.0.1
running egg_info
writing pysinsy.egg-info/PKG-INFO
writing dependency_links to pysinsy.egg-info/dependency_links.txt
writing requirements to pysinsy.egg-info/requires.txt
writing top-level names to pysinsy.egg-info/top_level.txt
reading manifest file 'pysinsy.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'LICENSE.md'
warning: no files found matching '.md' under directory 'pysinsy'
writing manifest file 'pysinsy.egg-info/SOURCES.txt'
running build_ext
building 'pysinsy.sinsy' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/lib/python3.6/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/include/python3.6m -c pysinsy/sinsy.cpp -o build/temp.linux-x86_64-3.6/pysinsy/sinsy.o
In file included from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1760,
from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from /usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from pysinsy/sinsy.cpp:651:
/usr/local/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
#warning "Using deprecated NumPy API, disable it by "
^~~~~~~
pysinsy/sinsy.cpp: In function ‘PyObject
__pyx_pf_7pysinsy_5sinsy_12LabelStrings_getData(__pyx_obj_7pysinsy_5sinsy_LabelStrings*)’:
pysinsy/sinsy.cpp:1902:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
~~~~~~~~~~^~~~~~~~~~~
g++ -pthread -shared build/temp.linux-x86_64-3.6/pysinsy/sinsy.o -L/usr/local/lib -L/usr/local/lib -lsinsy -lpython3.6m -o /work/nnsvs/docker/pysinsy/pysinsy/sinsy.cpython-36m-x86_64-linux-gnu.so
/usr/bin/ld: /usr/local/lib/libsinsy.a(Sinsy.cpp.o): relocation R_X86_64_PC32 against symbol _ZSt4cerr@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(Converter.cpp.o): relocation R_X86_64_PC32 against symbol _ZN5sinsy11PhonemeInfo11TYPE_SILENTB5cxx11E' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(PhonemeInfo.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy11PhonemeInfoE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(HtsEngine.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy9HtsEngineE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(SynthConditionImpl.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy18SynthConditionImplE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(LabelMaker.cpp.o): relocation R_X86_64_PC32 against symbol _ZTISt11range_error@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(LabelMeasure.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy12LabelMeasureE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(LabelPosition.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy13LabelPositionE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(LabelStrings.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy12LabelStringsE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(NoteGroup.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy9NoteGroupE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(NoteLabeler.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy11NoteLabelerE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(PhonemeLabeler.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy14PhonemeLabelerE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(SyllableLabeler.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy15SyllableLabelerE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(Beat.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy4BeatE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(Dynamics.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy8DynamicsE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(Key.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy3KeyE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(Mode.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy4ModeE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(Note.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy4NoteE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(Pitch.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy5PitchE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(Slur.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy4SlurE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(Syllabic.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy8SyllabicE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(ScoreDoctor.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy11ScoreDoctorE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(TempScore.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy9TempScoreE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(InputFile.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy9InputFileE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(OutputFile.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy10OutputFileE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(XmlReader.cpp.o): relocation R_X86_64_PC32 against symbol _ZTISt13runtime_error@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(XmlWriter.cpp.o): relocation R_X86_64_PC32 against symbol _ZTISt13runtime_error@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(ConfGroup.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy9ConfGroupE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(ConfManager.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy11ConfManagerE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(UnknownConf.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy11UnknownConfE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(util_converter.cpp.o): relocation R_X86_64_PC32 against symbol _ZSt3hexRSt8ios_base' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(JConf.cpp.o): relocation R_X86_64_PC32 against symbol _ZN5sinsy11PhonemeInfo10TYPE_VOWELB5cxx11E' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(LabelData.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy9LabelDataE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(Configurations.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy14ConfigurationsE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(MacronTable.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy11MacronTableE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(MultibyteCharRange.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy18MultibyteCharRangeE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(PhonemeTable.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy12PhonemeTable6ResultE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(StringTokenizer.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy15StringTokenizerE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libsinsy.a(XmlData.cpp.o): relocation R_X86_64_PC32 against symbol _ZTVN5sinsy7XmlDataE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /usr/local/lib/libsinsy.a(XmlParser.cpp.o): relocation R_X86_64_PC32 against symbol _ZN5sinsy15StreamExceptionD1Ev' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

error: ISO C++17 does not allow dynamic exception specifications

Such error occurs when trying to install pysinsy. Should I then add a flag somewhere like "--std=c++14"?

Building wheels for collected packages: pysinsy
Building wheel for pysinsy (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pysinsy (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [152 lines of output]
fatal: not a git repository (or any of the parent directories): .git
running bdist_wheel
running build
running build_py
-- Building version 0.0.4
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/pysinsy
copying pysinsy/version.py -> build/lib.linux-x86_64-3.8/pysinsy
copying pysinsy/init.py -> build/lib.linux-x86_64-3.8/pysinsy
creating build/lib.linux-x86_64-3.8/pysinsy/htsvoice
copying pysinsy/htsvoice/COPYING -> build/lib.linux-x86_64-3.8/pysinsy/htsvoice
copying pysinsy/htsvoice/nitech_jp_song070_f001.htsvoice -> build/lib.linux-x86_64-3.8/pysinsy/htsvoice
creating build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.euc_jp.table -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.macron -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.utf_8.table -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.shift_jis.table -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/COPYING -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.shift_jis.conf -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.euc_jp.conf -> build/lib.linux-x86_64-3.8/pysinsy/_dic
copying pysinsy/_dic/japanese.utf_8.conf -> build/lib.linux-x86_64-3.8/pysinsy/_dic
running build_ext
skipping 'pysinsy/sinsy.cpp' Cython extension (up-to-date)
building 'pysinsy.sinsy' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/pysinsy
creating build/temp.linux-x86_64-3.8/lib
creating build/temp.linux-x86_64-3.8/lib/sinsy
creating build/temp.linux-x86_64-3.8/lib/sinsy/src
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/converter
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/japanese
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/label
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/score
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/temporary
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/util
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/xml
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/hts_engine_API
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/hts_engine_API/hts_engine
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/hts_engine_API/hts_engine/src
creating build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/hts_engine_API/hts_engine/src/lib
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/converter -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/japanese -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/label -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/score -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/temporary -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/xml -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/hts_engine_API -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/hts_engine_API/hts_engine/src/lib -Ilib/sinsy/src/include/sinsy -Ilib/sinsy/src/lib/hts_engine_API/hts_engine/src/include -I/home/lutxang/vv/include -I/usr/include/python3.8 -c pysinsy/sinsy.cpp -o build/temp.linux-x86_64-3.8/pysinsy/sinsy.o
In file included from /tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
from /tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
from /tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
from pysinsy/sinsy.cpp:695:
/tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
17 | #warning "Using deprecated NumPy API, disable it with "
| ^~~~~~~
pysinsy/sinsy.cpp: In function ‘PyObject* __pyx_pf_7pysinsy_5sinsy_12LabelStrings_getData(__pyx_obj_7pysinsy_5sinsy_LabelStrings*)’:
pysinsy/sinsy.cpp:2078:33: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
2078 | for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
| ~~~~~~~~~~^~~~~~~~~~~
x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/tmp/pip-build-env-h9gx3vey/overlay/lib/python3.8/site-packages/numpy/core/include -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/converter -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/japanese -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/label -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/score -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/temporary -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/xml -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/hts_engine_API -I/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/hts_engine_API/hts_engine/src/lib -Ilib/sinsy/src/include/sinsy -Ilib/sinsy/src/lib/hts_engine_API/hts_engine/src/include -I/home/lutxang/vv/include -I/usr/include/python3.8 -c lib/sinsy/src/lib/Sinsy.cpp -o build/temp.linux-x86_64-3.8/lib/sinsy/src/lib/Sinsy.o
In file included from /tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/xml/XmlReader.h:50,
from lib/sinsy/src/lib/Sinsy.cpp:47:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/xml/XmlParser.h:62:66: error: ISO C++17 does not allow dynamic exception specifications
62 | XmlData* read(IReadableStream& stream, std::string& encoding) throw (StreamException);
| ^~~~~
In file included from /tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/InputFile.h:47,
from lib/sinsy/src/lib/Sinsy.cpp:49:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:64:51: error: ISO C++17 does not allow dynamic exception specifications
64 | virtual size_t read(void* buffer, size_t byte) throw (StreamException) = 0;
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:71:62: error: ISO C++17 does not allow dynamic exception specifications
71 | IReadableStream& fromStream(IReadableStream& stream, T& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:88:72: error: ISO C++17 does not allow dynamic exception specifications
88 | inline IReadableStream& operator>>(IReadableStream& stream, char& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:96:81: error: ISO C++17 does not allow dynamic exception specifications
96 | inline IReadableStream& operator>>(IReadableStream& stream, unsigned char& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:104:73: error: ISO C++17 does not allow dynamic exception specifications
104 | inline IReadableStream& operator>>(IReadableStream& stream, INT16& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:112:74: error: ISO C++17 does not allow dynamic exception specifications
112 | inline IReadableStream& operator>>(IReadableStream& stream, UINT16& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:120:73: error: ISO C++17 does not allow dynamic exception specifications
120 | inline IReadableStream& operator>>(IReadableStream& stream, INT32& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:128:74: error: ISO C++17 does not allow dynamic exception specifications
128 | inline IReadableStream& operator>>(IReadableStream& stream, UINT32& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:136:73: error: ISO C++17 does not allow dynamic exception specifications
136 | inline IReadableStream& operator>>(IReadableStream& stream, INT64& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:144:74: error: ISO C++17 does not allow dynamic exception specifications
144 | inline IReadableStream& operator>>(IReadableStream& stream, UINT64& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:152:73: error: ISO C++17 does not allow dynamic exception specifications
152 | inline IReadableStream& operator>>(IReadableStream& stream, float& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:160:74: error: ISO C++17 does not allow dynamic exception specifications
160 | inline IReadableStream& operator>>(IReadableStream& stream, double& buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IReadableStream.h:168:79: error: ISO C++17 does not allow dynamic exception specifications
168 | inline IReadableStream& operator>>(IReadableStream& stream, long double& buf) throw (StreamException)
| ^~~~~
In file included from lib/sinsy/src/lib/Sinsy.cpp:49:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/InputFile.h:65:43: error: ISO C++17 does not allow dynamic exception specifications
65 | size_t read(void* buffer, size_t size) throw (StreamException);
| ^~~~~
In file included from /tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/OutputFile.h:47,
from lib/sinsy/src/lib/Sinsy.cpp:50:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:63:58: error: ISO C++17 does not allow dynamic exception specifications
63 | virtual size_t write(const void* buffer, size_t byte) throw (StreamException) = 0;
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:87:71: error: ISO C++17 does not allow dynamic exception specifications
87 | inline IWritableStream& operator<<(IWritableStream& stream, char buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:95:80: error: ISO C++17 does not allow dynamic exception specifications
95 | inline IWritableStream& operator<<(IWritableStream& stream, unsigned char buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:103:72: error: ISO C++17 does not allow dynamic exception specifications
103 | inline IWritableStream& operator<<(IWritableStream& stream, INT16 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:111:73: error: ISO C++17 does not allow dynamic exception specifications
111 | inline IWritableStream& operator<<(IWritableStream& stream, UINT16 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:119:72: error: ISO C++17 does not allow dynamic exception specifications
119 | inline IWritableStream& operator<<(IWritableStream& stream, INT32 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:127:73: error: ISO C++17 does not allow dynamic exception specifications
127 | inline IWritableStream& operator<<(IWritableStream& stream, UINT32 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:135:72: error: ISO C++17 does not allow dynamic exception specifications
135 | inline IWritableStream& operator<<(IWritableStream& stream, INT64 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:143:73: error: ISO C++17 does not allow dynamic exception specifications
143 | inline IWritableStream& operator<<(IWritableStream& stream, UINT64 buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:151:72: error: ISO C++17 does not allow dynamic exception specifications
151 | inline IWritableStream& operator<<(IWritableStream& stream, float buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:159:73: error: ISO C++17 does not allow dynamic exception specifications
159 | inline IWritableStream& operator<<(IWritableStream& stream, double buf) throw (StreamException)
| ^~~~~
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/IWritableStream.h:167:78: error: ISO C++17 does not allow dynamic exception specifications
167 | inline IWritableStream& operator<<(IWritableStream& stream, long double buf) throw (StreamException)
| ^~~~~
In file included from lib/sinsy/src/lib/Sinsy.cpp:50:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/OutputFile.h:65:50: error: ISO C++17 does not allow dynamic exception specifications
65 | size_t write(const void* buffer, size_t size) throw (StreamException);
| ^~~~~
In file included from lib/sinsy/src/lib/Sinsy.cpp:51:
/tmp/pip-install-vrpjnsjk/pysinsy_1382a75bd0274b62b2133d4989331d6a/lib/sinsy/src/lib/util/WritableStrStream.h:67:48: error: ISO C++17 does not allow dynamic exception specifications
67 | WritableStrStream& operator<<(const T& buf) throw (StreamException) {
| ^~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pysinsy
Failed to build pysinsy
ERROR: Could not build wheels for pysinsy, which is required to install pyproject.toml-based projects

Pysinsy wheel won't build

Happens with all pysinsy versions, using cython3.0.0 and tried other versions too

Error compiling Cython file:
      ------------------------------------------------------------
      ...

      cimport cython
      from libcpp.string cimport string
      from libcpp.vector cimport vector

      from sinsy cimport sinsy, label_strings
      ^
      ------------------------------------------------------------

      pysinsy\sinsy.pyx:13:0: 'sinsy.pxd' not found

This is then recursive and creates a lot more errors ending in a failed build
I have checked that pysinsy/sinsy/sinsy.pxd exists, so I don't know why this is happening

Tested with both ubuntu and windows

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.