コード例 #1
0
        private void InitialiseText()
        {
            _textIn = new TywiTextStream(new MemoryStream());
            _session.RegisterInputText(_textIn);

            _textOut = new TywiTextStream(new MemoryStream());
            _textOut.TextUpdated += this.UpdateTicker;
            _session.RegisterOutputText(_textOut);
        }
コード例 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="index"></param>
 /// <param name="stream"></param>
 /// <param name="device"></param>
 private void HandleOutputText(int index, TywiTextStream stream, DeviceProfile device)
 {
     TranscriptionModel transcriptions = _service.GetText(device);
     foreach (var line in transcriptions.transcriptions)
         stream.WriteText(line.text);
 }
コード例 #3
0
 public void RegisterOutputText(TywiTextStream stream)
 {
     _outputText = stream;
 }
コード例 #4
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="index"></param>
 /// <param name="stream"></param>
 /// <param name="device"></param>
 private void HandleInputText(int index, TywiTextStream stream, DeviceProfile device)
 {
     string text = stream.ReadText();
     if (text != null)
     {
         TextBlobModel textBlob = new TextBlobModel() { receivedTime = DateTime.Now, text = text };
         _service.PostText(textBlob, device);
     }
 }
コード例 #5
0
 public void RegisterInputText(TywiTextStream stream)
 {
     _inputText = stream;
 }