mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
issues/608
Update NeoSpeech.py
This commit is contained in:
parent
a3ee1e482d
commit
8c367a3994
@ -17,7 +17,10 @@ def sqlite2json2(self,sqlitefile,targetjson=None,existsmerge=False):
|
||||
for _aret in ret:
|
||||
if len(_aret)==4:
|
||||
|
||||
_id,source_parsed,mt,source=_aret
|
||||
_id,source,mt,source_origin=_aret
|
||||
if targetjson:
|
||||
source=source_origin
|
||||
|
||||
js_format2[source]=mt
|
||||
elif len(_aret)==3:
|
||||
_id,source,mt =_aret
|
||||
|
@ -65,7 +65,8 @@ class TTS(TTSbase):
|
||||
def speak(self,content,rate,voice,voice_idx):
|
||||
self.checkchange()
|
||||
windows.WriteFile(self.hPipe,bytes(ctypes.c_uint(rate)))
|
||||
windows.WriteFile(self.hPipe,content.encode('utf-16-le'))
|
||||
buf=ctypes.create_unicode_buffer(content,10000)
|
||||
windows.WriteFile(self.hPipe,bytes(buf))
|
||||
fname=windows.ReadFile(self.hPipe,1024,None).decode('utf-16-le')
|
||||
if os.path.exists(fname):
|
||||
return(fname)
|
||||
|
Loading…
x
Reference in New Issue
Block a user