Нема описа

Tobias Platen 5373bc6144 export needed apis for testing UTAU, switch to utf8 пре 2 година
.github c739e6b19b Add python versions пре 4 година
pysinsy 5373bc6144 export needed apis for testing UTAU, switch to utf8 пре 2 година
tests 9ab152e325 Fix flake8 пре 4 година
.gitignore 9cb10c399e add gitignore пре 4 година
LICENSE 5fdbad46b1 Initial working version пре 4 година
MANIFEST.in 5fdbad46b1 Initial working version пре 4 година
README.md 3d1d57614e Add badge пре 4 година
requirements.txt 1f89b15b70 Add requirements.txt пре 4 година
setup.cfg 5fdbad46b1 Initial working version пре 4 година
setup.py 9ab152e325 Fix flake8 пре 4 година
tox.ini 532dc90087 Add tox.ini пре 4 година

README.md

Pysinsy

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. I will tag a release once I finish the initial design.

Installation

This package is built on the sinsy's shared library. You must need to compile sinsy from source and install it on your system. Please see https://github.com/r9y9/sinsy and install it first.

After installing sinsy, you can install pysinsy by:

python setup.py develop

Quick demo

import pysinsy

sinsy = pysinsy.sinsy.Sinsy()

# Set language to Japanese
assert sinsy.setLanguages("j", "/usr/local/lib/sinsy/dic")

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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&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