RECONNAISSANCE VOCALE AVEC SYSTEM.SPEECH.RECOGNITION

vitemassou Messages postés 12 Date d'inscription mercredi 14 avril 2004 Statut Membre Dernière intervention 7 mars 2012 - 7 juin 2009 à 22:55
 amalpolytech - 23 févr. 2016 à 14:49
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.

https://codes-sources.commentcamarche.net/source/50059-reconnaissance-vocale-avec-system-speech-recognition

bonjour,

un bon exemple qui m aide a commencer avec la reco vocale en c# mais j ai tjrs des exeptions!?

meme probleme..j ai deja telechargé msagent pour l erreur de Genie!! le charactere agent qui existe dans le code.. et autre fichiers utiles...mais j'ai toujours une erreur lors de start au niveau de depart?? ne peut pas instancier la classe depart!

merci d'avance de proposer une solution?!
canacana Messages postés 13 Date d'inscription mardi 2 octobre 2007 Statut Membre Dernière intervention 2 août 2011
5 févr. 2010 à 14:36
vitemassou, j'ai le meme probleme est-ceque t 'as eu la solution a ton prbleme?
Merci de me send la solution.
lassie14 Messages postés 45 Date d'inscription dimanche 29 mai 2005 Statut Membre Dernière intervention 3 mai 2010
21 juil. 2009 à 11:51
lassie14 Messages postés 45 Date d'inscription dimanche 29 mai 2005 Statut Membre Dernière intervention 3 mai 2010
21 juil. 2009 à 11:47
regarde ton message d'erreur c'est ecrit dedans "La reconnaissance vocale n'est pas disponible sur ce système. Impossible de trouver le moteur SAPI et le moteur de reconnaissance vocale."
il te faut installer un truc a mon avis
vitemassou Messages postés 12 Date d'inscription mercredi 14 avril 2004 Statut Membre Dernière intervention 7 mars 2012
7 juin 2009 à 22:55
Bonjour,

Ce source a l'air vraiment intéressant, mais malheureusement j'ai cette erreur au démarrage.
Quelqu'un saurait comment régler le problème ?

L'exception System.Windows.Markup.XamlParseException n'a pas été gérée
Message="Impossible de créer une instance de 'Depart' définie dans l'assembly 'ProjetDemo, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Une exception a été levée par la cible d'un appel. Erreur dans le fichier de balisage 'Depart.xaml' ligne 1 position 9."
Source="PresentationFramework"
LineNumber=1
LinePosition=9
StackTrace:
à System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
à System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
à System.Windows.Markup.BamlRecordReader.ThrowExceptionWithLine(String message, Exception innerException)
à System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
à System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord bamlElementStartRecord, Object& element, ReaderFlags& flags, Type& delayCreatedType, Int16& delayCreatedTypeId)
à System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
à System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
à System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
à System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
à System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()
à System.Windows.Markup.TreeBuilder.Parse()
à System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
à System.Windows.Application.LoadBamlStreamWithSyncInfo(Stream stream, ParserContext pc)
à System.Windows.Application.LoadComponent(Uri resourceLocator, Boolean bSkipJournaledProperties)
à System.Windows.Application.DoStartup()
à System.Windows.Application.<.ctor>b__0(Object unused)
à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
à System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
à System.Windows.Threading.DispatcherOperation.InvokeImpl()
à System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
à System.Threading.ExecutionContext.runTryCode(Object userData)
à System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Windows.Threading.DispatcherOperation.Invoke()
à System.Windows.Threading.Dispatcher.ProcessQueue()
à System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
à MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
à MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
à System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
à System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
à System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
à System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
à MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
à System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
à System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
à System.Windows.Threading.Dispatcher.Run()
à System.Windows.Application.RunDispatcher(Object ignore)
à System.Windows.Application.RunInternal(Window window)
à System.Windows.Application.Run(Window window)
à System.Windows.Application.Run()
à ProjetDemo.App.Main() dans C:\Downloads\ProjetDemo\SenyniumX_VentilateurSpeech\obj\Debug\App.g.cs:ligne 0
à System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
à System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
à Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
à System.Threading.ThreadHelper.ThreadStart_Context(Object state)
à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
à System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Reflection.TargetInvocationException
Message="Une exception a été levée par la cible d'un appel."
Source="mscorlib"
StackTrace:
à System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
à System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
à System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
à System.Activator.CreateInstance(Type type, Boolean nonPublic)
à System.Windows.Markup.BamlRecordReader.CreateInstanceFromType(Type type, Int16 typeId, Boolean throwOnFail)
InnerException: System.PlatformNotSupportedException
Message="La reconnaissance vocale n'est pas disponible sur ce système. Impossible de trouver le moteur SAPI et le moteur de reconnaissance vocale."
Source="System.Speech"
StackTrace:
à System.Speech.Recognition.RecognizerBase.Initialize(SapiRecognizer recognizer, Boolean inproc)
à System.Speech.Recognition.SpeechRecognitionEngine.get_RecoBase()
à System.Speech.Recognition.SpeechRecognitionEngine.LoadGrammar(Grammar grammar)
à ProjetDemo.Depart..ctor() dans C:\Downloads\ProjetDemo\SenyniumX_VentilateurSpeech\Depart.xaml.cs:ligne 59
InnerException:
Rejoignez-nous