|
|
@@ -14,10 +14,19 @@ class Aques: |
|
|
|
with open (phont_file, 'rb') as f: |
|
|
|
phont = f.read () |
|
|
|
|
|
|
|
aqkoe = cdll.LoadLibrary ('libAqKanji2Koe.so') |
|
|
|
dic_path: str = '.' |
|
|
|
err = c_int (0) |
|
|
|
aqkoe.AqKanji2Koe_Create.restype = c_void_p |
|
|
|
handle = aqkoe.AqKanji2Koe_Create (dic_path, byref (err)) |
|
|
|
koe: str = '' |
|
|
|
aqkoe.AqKanji2Koe_Convert.restype = c_int |
|
|
|
aqkoe.AqKanji2Koe_Convert (handle, text.encode ('utf-8'), koe, 4096) |
|
|
|
|
|
|
|
aqtk = cdll.LoadLibrary ('libAquesTalk2Eva.so') |
|
|
|
aqtk.AquesTalk2_Synthe_Utf8.restype = POINTER (ARRAY (c_ubyte, 0)) |
|
|
|
size = c_int (0) |
|
|
|
wav_p = aqtk.AquesTalk2_Synthe_Utf8 (text.encode ('utf-8'), speed, |
|
|
|
wav_p = aqtk.AquesTalk2_Synthe_Utf8 (koe.encode ('utf-8'), speed, |
|
|
|
byref (size), phont) |
|
|
|
|
|
|
|
if not bool (wav_p): |
|
|
|