Assuming you can use unixCmdGetStdOut
.
Run
pip install pyphen
in the terminal first,
then in supercollider:
~get_sylabs = {|text|
format(
"python -c \"import pyphen; out = pyphen.Pyphen(left=1, right=1, lang='it_IT').inserted('%'); print(out)\"",
text
).unixCmdGetStdOut.split($-)
}
~get_sylabs.("Esempio, questa Stringa").do(_.postln)
returns:
E
sem
pio,
que
sta
Strin
ga
Seems pretty snappy to me.
Edit: added the split($-)
Edit 2: just fixed the fact it split Esem
wrong
"Esempio, questa Stringa".reject(_ == $,).split($ ).collect(~get_sylabs)