diff --git a/LunaTranslator/LunaTranslator/gui/pretransfile.py b/LunaTranslator/LunaTranslator/gui/pretransfile.py index 5d5ffebe..8e8bb487 100644 --- a/LunaTranslator/LunaTranslator/gui/pretransfile.py +++ b/LunaTranslator/LunaTranslator/gui/pretransfile.py @@ -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 diff --git a/LunaTranslator/LunaTranslator/tts/NeoSpeech.py b/LunaTranslator/LunaTranslator/tts/NeoSpeech.py index f1c57222..78aa0b07 100644 --- a/LunaTranslator/LunaTranslator/tts/NeoSpeech.py +++ b/LunaTranslator/LunaTranslator/tts/NeoSpeech.py @@ -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)