File size: 396 Bytes
4300fed
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
from .cleaner import spanish_cleaners
from .gruut_wrapper import Gruut

def es2ipa(text):
    e = Gruut(language="es-es", keep_puncs=True, keep_stress=True, use_espeak_phonemes=True)
    # text = spanish_cleaners(text)
    phonemes = e.phonemize(text, separator="")
    return phonemes


if __name__ == '__main__':
  print(es2ipa('¿Y a quién echaría de menos, en el mundo si no fuese a vos?'))