Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Speech / Src / Internal / Synthesis / ISSmlParser.cs / 1 / ISSmlParser.cs
//// Copyright (c) Microsoft Corporation. All rights reserved. // // // Description: // // History: // 3/15/2005 jeanfp Created //---------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Speech.Synthesis; using System.Speech.Synthesis.TtsEngine; using System.Text; using System.Xml; namespace System.Speech.Internal.Synthesis { //******************************************************************* // // Internal Types // //******************************************************************* #region Internal Types internal interface ISsmlParser { object ProcessSpeak (string sVersion, string sBaseUri, CultureInfo culture, ListextraNamespace); void ProcessText (string text, object voice, ref FragmentState fragmentState, int position, bool fIgnore); void ProcessAudio (object voice, string sUri, string baseUri, bool fIgnore); void ProcessBreak (object voice, ref FragmentState fragmentState, EmphasisBreak eBreak, int time, bool fIgnore); void ProcessDesc (CultureInfo culture); void ProcessEmphasis (bool noLevel, EmphasisWord word); void ProcessMark (object voice, ref FragmentState fragmentState, string name, bool fIgnore); object ProcessTextBlock (bool isParagraph, object voice, ref FragmentState fragmentState, CultureInfo culture, bool newCulture, VoiceGender gender, VoiceAge age); void EndProcessTextBlock (bool isParagraph); void ProcessPhoneme (ref FragmentState fragmentState, AlphabetType alphabet, string ph, char [] phoneIds); void ProcessProsody (string pitch, string range, string rate, string volume, string duration, string points); void ProcessSayAs (string interpretAs, string format, string detail); void ProcessSub (string alias, object voice, ref FragmentState fragmentState, int position, bool fIgnore); object ProcessVoice (string name, CultureInfo culture, VoiceGender gender, VoiceAge age, int variant, bool fNewCulture, List extraNamespace); void ProcessLexicon (Uri uri, string type); void EndElement (); void EndSpeakElement (); void ProcessUnknownElement (object voice, ref FragmentState fragmentState, XmlReader reader); void StartProcessUnknownAttributes (object voice, ref FragmentState fragmentState, string element, List extraAttributes); void EndProcessUnknownAttributes (object voice, ref FragmentState fragmentState, string element, List extraAttributes); // Prompt data used void ContainsPexml (string pexmlPrefix); // Prompt Engine tags bool BeginPromptEngineOutput (object voice); void EndPromptEngineOutput (object voice); // global elements bool ProcessPromptEngineDatabase (object voice, string fname, string delta, string idset); bool ProcessPromptEngineDiv (object voice); bool ProcessPromptEngineId (object voice, string id); // scoped elements bool BeginPromptEngineTts (object voice); void EndPromptEngineTts (object voice); bool BeginPromptEngineWithTag (object voice, string tag); void EndPromptEngineWithTag (object voice, string tag); bool BeginPromptEngineRule (object voice, string name); void EndPromptEngineRule (object voice, string name); // Properties string Ssml { get; } } internal class LexiconEntry { internal Uri _uri; internal string _mediaType; internal LexiconEntry (Uri uri, string mediaType) { _uri = uri; _mediaType = mediaType; } /// /// Tests whether two objects are equivalent /// public override bool Equals (object obj) { LexiconEntry entry = obj as LexiconEntry; return entry != null && _uri.Equals (entry._uri); } ////// Overrides Object.GetHashCode() /// public override int GetHashCode () { return _uri.GetHashCode (); } } internal class SsmlXmlAttribute { internal SsmlXmlAttribute (string prefix, string name, string value, string ns) { _prefix = prefix; _name = name; _value = value; _ns = ns; } internal string _prefix; internal string _name; internal string _value; internal string _ns; } #endregion } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //// Copyright (c) Microsoft Corporation. All rights reserved. // // // Description: // // History: // 3/15/2005 jeanfp Created //---------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Speech.Synthesis; using System.Speech.Synthesis.TtsEngine; using System.Text; using System.Xml; namespace System.Speech.Internal.Synthesis { //******************************************************************* // // Internal Types // //******************************************************************* #region Internal Types internal interface ISsmlParser { object ProcessSpeak (string sVersion, string sBaseUri, CultureInfo culture, ListextraNamespace); void ProcessText (string text, object voice, ref FragmentState fragmentState, int position, bool fIgnore); void ProcessAudio (object voice, string sUri, string baseUri, bool fIgnore); void ProcessBreak (object voice, ref FragmentState fragmentState, EmphasisBreak eBreak, int time, bool fIgnore); void ProcessDesc (CultureInfo culture); void ProcessEmphasis (bool noLevel, EmphasisWord word); void ProcessMark (object voice, ref FragmentState fragmentState, string name, bool fIgnore); object ProcessTextBlock (bool isParagraph, object voice, ref FragmentState fragmentState, CultureInfo culture, bool newCulture, VoiceGender gender, VoiceAge age); void EndProcessTextBlock (bool isParagraph); void ProcessPhoneme (ref FragmentState fragmentState, AlphabetType alphabet, string ph, char [] phoneIds); void ProcessProsody (string pitch, string range, string rate, string volume, string duration, string points); void ProcessSayAs (string interpretAs, string format, string detail); void ProcessSub (string alias, object voice, ref FragmentState fragmentState, int position, bool fIgnore); object ProcessVoice (string name, CultureInfo culture, VoiceGender gender, VoiceAge age, int variant, bool fNewCulture, List extraNamespace); void ProcessLexicon (Uri uri, string type); void EndElement (); void EndSpeakElement (); void ProcessUnknownElement (object voice, ref FragmentState fragmentState, XmlReader reader); void StartProcessUnknownAttributes (object voice, ref FragmentState fragmentState, string element, List extraAttributes); void EndProcessUnknownAttributes (object voice, ref FragmentState fragmentState, string element, List extraAttributes); // Prompt data used void ContainsPexml (string pexmlPrefix); // Prompt Engine tags bool BeginPromptEngineOutput (object voice); void EndPromptEngineOutput (object voice); // global elements bool ProcessPromptEngineDatabase (object voice, string fname, string delta, string idset); bool ProcessPromptEngineDiv (object voice); bool ProcessPromptEngineId (object voice, string id); // scoped elements bool BeginPromptEngineTts (object voice); void EndPromptEngineTts (object voice); bool BeginPromptEngineWithTag (object voice, string tag); void EndPromptEngineWithTag (object voice, string tag); bool BeginPromptEngineRule (object voice, string name); void EndPromptEngineRule (object voice, string name); // Properties string Ssml { get; } } internal class LexiconEntry { internal Uri _uri; internal string _mediaType; internal LexiconEntry (Uri uri, string mediaType) { _uri = uri; _mediaType = mediaType; } /// /// Tests whether two objects are equivalent /// public override bool Equals (object obj) { LexiconEntry entry = obj as LexiconEntry; return entry != null && _uri.Equals (entry._uri); } ////// Overrides Object.GetHashCode() /// public override int GetHashCode () { return _uri.GetHashCode (); } } internal class SsmlXmlAttribute { internal SsmlXmlAttribute (string prefix, string name, string value, string ns) { _prefix = prefix; _name = name; _value = value; _ns = ns; } internal string _prefix; internal string _name; internal string _value; internal string _ns; } #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
- QilLoop.cs
- ServiceManager.cs
- Semaphore.cs
- AppSettingsExpressionBuilder.cs
- ProfileParameter.cs
- XPathParser.cs
- FixedPageAutomationPeer.cs
- TypeElementCollection.cs
- LoggedException.cs
- BindingCollection.cs
- DecimalConstantAttribute.cs
- EntityDataSourceWrapper.cs
- _OverlappedAsyncResult.cs
- Variant.cs
- AppDomain.cs
- HtmlInputImage.cs
- figurelengthconverter.cs
- Duration.cs
- ReversePositionQuery.cs
- SiteMapPath.cs
- XmlWellformedWriterHelpers.cs
- ContextConfiguration.cs
- CalendarDay.cs
- FormattedTextSymbols.cs
- NamespaceMapping.cs
- ParseHttpDate.cs
- Content.cs
- ConfigurationProperty.cs
- EntitySetBase.cs
- InlineCategoriesDocument.cs
- ScriptServiceAttribute.cs
- ParameterBuilder.cs
- XmlSchemaComplexContent.cs
- formatstringdialog.cs
- HttpAsyncResult.cs
- TypeBrowser.xaml.cs
- ImpersonationContext.cs
- GridViewPageEventArgs.cs
- TdsParserHelperClasses.cs
- Speller.cs
- RenderTargetBitmap.cs
- Perspective.cs
- ZoneButton.cs
- StaticSiteMapProvider.cs
- BlobPersonalizationState.cs
- DataGridGeneralPage.cs
- SkipQueryOptionExpression.cs
- FileDialogCustomPlace.cs
- MobileControlPersister.cs
- DirtyTextRange.cs
- XhtmlBasicCommandAdapter.cs
- SingleSelectRootGridEntry.cs
- TextDecorationLocationValidation.cs
- AggregateException.cs
- SoapReflectionImporter.cs
- CursorConverter.cs
- ProofTokenCryptoHandle.cs
- ApplicationManager.cs
- DataGridViewCellCollection.cs
- UdpSocket.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- DataSourceXmlSerializationAttribute.cs
- MessageTraceRecord.cs
- TypeResolvingOptionsAttribute.cs
- PeerValidationBehavior.cs
- WebMessageEncodingElement.cs
- ToolStripDesigner.cs
- CorruptStoreException.cs
- ObjectView.cs
- ToolZone.cs
- LocatorPart.cs
- BitmapMetadataBlob.cs
- TemplateField.cs
- XPathParser.cs
- X509UI.cs
- XsdCachingReader.cs
- ResourceProperty.cs
- Pen.cs
- CompositeScriptReference.cs
- CompositionTarget.cs
- HttpFileCollection.cs
- WrapperSecurityCommunicationObject.cs
- DateTimePicker.cs
- TextTabProperties.cs
- CompModSwitches.cs
- DesignerProperties.cs
- SafeLibraryHandle.cs
- EventProvider.cs
- WindowsEditBoxRange.cs
- PerformanceCounterNameAttribute.cs
- CroppedBitmap.cs
- WebServicesInteroperability.cs
- AccessDataSource.cs
- remotingproxy.cs
- AutoScrollHelper.cs
- SelectedGridItemChangedEvent.cs
- InstallerTypeAttribute.cs
- ZeroOpNode.cs
- ClientSettingsStore.cs
- SqlDataSourceSelectingEventArgs.cs