Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / Synthesis / TTSEvent.cs / 1 / TTSEvent.cs
//------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Contains either a reference to an audio audioStream or a list of
// bookmark fragments.
//
// History:
// 2/1/2005 jeanfp Created from the Sapi Managed code
//-----------------------------------------------------------------
using System;
using System.Speech.Internal.ObjectTokens;
using System.Speech.Synthesis;
using System.Speech.Synthesis.TtsEngine;
namespace System.Speech.Internal.Synthesis
{
///
///
///
internal class TTSEvent
{
//*******************************************************************
//
// Constructors
//
//*******************************************************************
#region Constructors
internal TTSEvent (TtsEventId id, Prompt prompt, Exception exception, VoiceInfo voice)
{
_evtId = id;
_prompt = prompt;
_exception = exception;
_voice = voice;
}
internal TTSEvent (TtsEventId id, Prompt prompt, Exception exception, VoiceInfo voice, TimeSpan audioPosition, long streamPosition, string bookmark, uint wParam, IntPtr lParam)
: this (id, prompt, exception, voice)
{
_audioPosition = audioPosition;
_bookmark = bookmark;
_wParam = wParam;
_lParam = lParam;
#if SPEECHSERVER
_streamPosition = streamPosition;
#endif
}
#if !SPEECHSERVER
private TTSEvent()
{
}
static internal TTSEvent CreatePhonemeEvent(string phoneme, string nextPhoneme,
TimeSpan duration, SynthesizerEmphasis emphasis,
Prompt prompt, TimeSpan audioPosition)
{
TTSEvent ttsEvent = new TTSEvent();
ttsEvent._evtId = TtsEventId.Phoneme;
ttsEvent._audioPosition = audioPosition;
ttsEvent._prompt = prompt;
ttsEvent._phoneme = phoneme;
ttsEvent._nextPhoneme = nextPhoneme;
ttsEvent._phonemeDuration = duration;
ttsEvent._phonemeEmphasis = emphasis;
return ttsEvent;
}
#endif
#endregion
//********************************************************************
//
// Internal Properties
//
//*******************************************************************
#region Internal Properties
internal TtsEventId Id
{
get
{
return _evtId;
}
}
internal Exception Exception
{
get
{
return _exception;
}
}
internal Prompt Prompt
{
get
{
return _prompt;
}
}
internal VoiceInfo Voice
{
get
{
return _voice;
}
}
internal TimeSpan AudioPosition
{
get
{
return _audioPosition;
}
}
internal string Bookmark
{
get
{
return _bookmark;
}
}
internal IntPtr LParam
{
get
{
return _lParam;
}
}
internal uint WParam
{
get
{
return _wParam;
}
}
#if !SPEECHSERVER
internal SynthesizerEmphasis PhonemeEmphasis
{
get
{
return _phonemeEmphasis;
}
}
internal string Phoneme
{
get
{
return _phoneme;
}
}
internal string NextPhoneme
{
get
{
return _nextPhoneme;
}
set
{
_nextPhoneme = value;
}
}
internal TimeSpan PhonemeDuration
{
get
{
return _phonemeDuration;
}
}
#else
internal long StreamPosition
{
get
{
return _streamPosition;
}
}
#endif
#endregion
//********************************************************************
//
// Private Fields
//
//********************************************************************
#region private Fields
private TtsEventId _evtId;
private Exception _exception;
private VoiceInfo _voice;
private TimeSpan _audioPosition;
private string _bookmark;
private uint _wParam;
private IntPtr _lParam;
private Prompt _prompt;
#if !SPEECHSERVER
//
// Data for phoneme event
//
private string _phoneme;
private string _nextPhoneme;
private TimeSpan _phonemeDuration;
private SynthesizerEmphasis _phonemeEmphasis;
#else
private long _streamPosition;
#endif
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Contains either a reference to an audio audioStream or a list of
// bookmark fragments.
//
// History:
// 2/1/2005 jeanfp Created from the Sapi Managed code
//-----------------------------------------------------------------
using System;
using System.Speech.Internal.ObjectTokens;
using System.Speech.Synthesis;
using System.Speech.Synthesis.TtsEngine;
namespace System.Speech.Internal.Synthesis
{
///
///
///
internal class TTSEvent
{
//*******************************************************************
//
// Constructors
//
//*******************************************************************
#region Constructors
internal TTSEvent (TtsEventId id, Prompt prompt, Exception exception, VoiceInfo voice)
{
_evtId = id;
_prompt = prompt;
_exception = exception;
_voice = voice;
}
internal TTSEvent (TtsEventId id, Prompt prompt, Exception exception, VoiceInfo voice, TimeSpan audioPosition, long streamPosition, string bookmark, uint wParam, IntPtr lParam)
: this (id, prompt, exception, voice)
{
_audioPosition = audioPosition;
_bookmark = bookmark;
_wParam = wParam;
_lParam = lParam;
#if SPEECHSERVER
_streamPosition = streamPosition;
#endif
}
#if !SPEECHSERVER
private TTSEvent()
{
}
static internal TTSEvent CreatePhonemeEvent(string phoneme, string nextPhoneme,
TimeSpan duration, SynthesizerEmphasis emphasis,
Prompt prompt, TimeSpan audioPosition)
{
TTSEvent ttsEvent = new TTSEvent();
ttsEvent._evtId = TtsEventId.Phoneme;
ttsEvent._audioPosition = audioPosition;
ttsEvent._prompt = prompt;
ttsEvent._phoneme = phoneme;
ttsEvent._nextPhoneme = nextPhoneme;
ttsEvent._phonemeDuration = duration;
ttsEvent._phonemeEmphasis = emphasis;
return ttsEvent;
}
#endif
#endregion
//********************************************************************
//
// Internal Properties
//
//*******************************************************************
#region Internal Properties
internal TtsEventId Id
{
get
{
return _evtId;
}
}
internal Exception Exception
{
get
{
return _exception;
}
}
internal Prompt Prompt
{
get
{
return _prompt;
}
}
internal VoiceInfo Voice
{
get
{
return _voice;
}
}
internal TimeSpan AudioPosition
{
get
{
return _audioPosition;
}
}
internal string Bookmark
{
get
{
return _bookmark;
}
}
internal IntPtr LParam
{
get
{
return _lParam;
}
}
internal uint WParam
{
get
{
return _wParam;
}
}
#if !SPEECHSERVER
internal SynthesizerEmphasis PhonemeEmphasis
{
get
{
return _phonemeEmphasis;
}
}
internal string Phoneme
{
get
{
return _phoneme;
}
}
internal string NextPhoneme
{
get
{
return _nextPhoneme;
}
set
{
_nextPhoneme = value;
}
}
internal TimeSpan PhonemeDuration
{
get
{
return _phonemeDuration;
}
}
#else
internal long StreamPosition
{
get
{
return _streamPosition;
}
}
#endif
#endregion
//********************************************************************
//
// Private Fields
//
//********************************************************************
#region private Fields
private TtsEventId _evtId;
private Exception _exception;
private VoiceInfo _voice;
private TimeSpan _audioPosition;
private string _bookmark;
private uint _wParam;
private IntPtr _lParam;
private Prompt _prompt;
#if !SPEECHSERVER
//
// Data for phoneme event
//
private string _phoneme;
private string _nextPhoneme;
private TimeSpan _phonemeDuration;
private SynthesizerEmphasis _phonemeEmphasis;
#else
private long _streamPosition;
#endif
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RequiredFieldValidator.cs
- SafeHandles.cs
- DoubleMinMaxAggregationOperator.cs
- DataBoundControl.cs
- SQLGuidStorage.cs
- ObjectStateFormatter.cs
- CodeTypeOfExpression.cs
- DocumentXmlWriter.cs
- ErrorFormatterPage.cs
- BinHexDecoder.cs
- ConnectionStringSettingsCollection.cs
- ParentControlDesigner.cs
- DoubleKeyFrameCollection.cs
- QueueProcessor.cs
- MemberInfoSerializationHolder.cs
- XmlDocumentFragment.cs
- XmlWriterTraceListener.cs
- RemoveFromCollection.cs
- ToolStripItemClickedEventArgs.cs
- MessageQueue.cs
- ParameterCollection.cs
- Win32MouseDevice.cs
- ResourceDictionary.cs
- HwndSubclass.cs
- DataExpression.cs
- Matrix3DStack.cs
- ResourceExpression.cs
- ListViewSortEventArgs.cs
- UdpUtility.cs
- WCFBuildProvider.cs
- AQNBuilder.cs
- MessageQueueEnumerator.cs
- DataContractFormatAttribute.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- CompareValidator.cs
- TimerExtension.cs
- CqlLexer.cs
- Span.cs
- WindowHideOrCloseTracker.cs
- CompositeActivityMarkupSerializer.cs
- TCPClient.cs
- BinaryUtilClasses.cs
- ImageCollectionCodeDomSerializer.cs
- DataListComponentEditor.cs
- DrawingBrush.cs
- SQLDateTimeStorage.cs
- LocalBuilder.cs
- InfoCardConstants.cs
- UnitySerializationHolder.cs
- Convert.cs
- TableSectionStyle.cs
- DataContractJsonSerializerOperationFormatter.cs
- ComboBox.cs
- BaseDataBoundControl.cs
- HtmlTableCell.cs
- TextServicesCompartmentEventSink.cs
- SessionIDManager.cs
- TextProviderWrapper.cs
- ExceptionUtility.cs
- Collection.cs
- ActivitySurrogateSelector.cs
- PenLineJoinValidation.cs
- ConfigXmlText.cs
- COM2IProvidePropertyBuilderHandler.cs
- StylusCaptureWithinProperty.cs
- FormViewUpdatedEventArgs.cs
- UnsafeNativeMethods.cs
- DataExpression.cs
- ExpressionBuilder.cs
- RootBrowserWindow.cs
- XmlDocument.cs
- IndexerNameAttribute.cs
- ColumnMapTranslator.cs
- HighlightVisual.cs
- HtmlInputReset.cs
- ManagementClass.cs
- CodeTypeReferenceSerializer.cs
- SmtpDigestAuthenticationModule.cs
- QueryCoreOp.cs
- ContentTypeSettingClientMessageFormatter.cs
- HMACSHA256.cs
- RewritingPass.cs
- FrugalMap.cs
- WebPartEditVerb.cs
- PrintController.cs
- FileSystemInfo.cs
- KeyedCollection.cs
- MappingItemCollection.cs
- BooleanProjectedSlot.cs
- DataObjectEventArgs.cs
- StructuredProperty.cs
- KeyEventArgs.cs
- filewebrequest.cs
- PermissionSetTriple.cs
- TagNameToTypeMapper.cs
- DictionaryChange.cs
- EntityViewGenerator.cs
- CheckBoxField.cs
- PersonalizationAdministration.cs
- AbandonedMutexException.cs