void ITTSCentral.Phoneme(VOICECHARSET eCharacterSet, uint dwFlags, SDATA dText, out SDATA pdPhoneme) { try { miniLog("Phoneme"); pdPhoneme = new SDATA(); pdPhoneme.dwSize = 0; } catch (Exception e) { pdPhoneme = new SDATA(); Sapi4Engine.miniLog(e + ": " + e.Message); } }
void ITTSCentral.TextData(VOICECHARSET eCharacterSet, uint dwFlags, SDATA dText, object pNotifyInterface, Guid IIDNotifyInterface) { try { miniLog("TextData " + dText.AsString); StringCharProducer scp = new StringCharProducer(dText.AsString); Tokenizer tokenizer = new Tokenizer(); Parser parser = new Parser(); Segmenter segmenter = new Segmenter(); Phonetizer phonetizer = new Phonetizer(); FujisakiProcessor fujisaki = new FujisakiProcessor(); MBROLATranslator translator = new MBROLATranslator(); MBROLASynthesizer synthesizer = new MBROLASynthesizer(); synthesizer.Voice = translator.Voice = modeInfo.Voice; tokenizer.Run(scp); parser.Run(tokenizer); segmenter.Run(parser); phonetizer.Run(segmenter); fujisaki.Run(phonetizer); translator.Run(fujisaki); synthesizer.Run(translator); /* DelegateConsumer<MBROLAElement> delegc = new DelegateConsumer<MBROLAElement>(); * delegc.ItemConsumed += delegate(MBROLAElement item) * { * miniLog("dummy sees: " + item.ToString()); * }; * delegc.Run(translator); * delegc.Join();*/ Sapi4AudioTarget target = new Sapi4AudioTarget(audioObject); target.Run(synthesizer); } catch (Exception e) { Sapi4Engine.miniLog(e + ": " + e.Message); } }
void ILexPronounce.Get(VOICECHARSET CharSet, string pszText, short wSense, string pszPronounce, int dwPronounceSize, ref int pdwPronounceNeeded, ref VOICEPARTOFSPEECH pPartOfSpeech, IntPtr pEngineInfo, int dwEngineInfoSize, ref int pdwEngineInfoNeeded) { //throw new Exception("The method or operation is not implemented."); }
void ILexPronounce.Add(VOICECHARSET CharSet, string pszText, string pszPronounce, VOICEPARTOFSPEECH PartOfSpeech, IntPtr pEngineInfo, int dwEngineInfoSize) { //throw new Exception("The method or operation is not implemented."); }