Problème avec la méthode Speak de SpVoice??!!??

cs_othland Messages postés 298 Date d'inscription jeudi 18 décembre 2003 Statut Membre Dernière intervention 9 février 2010 - 22 mars 2006 à 16:24
Lutinore Messages postés 3246 Date d'inscription lundi 25 avril 2005 Statut Membre Dernière intervention 27 octobre 2012 - 22 mars 2006 à 17:47
slt tlm,
au début, j'ai fait le code suivant :
using System;
using System.Collections.Generic;
using System.Text;
using SpeechLib;


namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            SpVoice spVoice = new SpVoice();
            spVoice.Speak("Bienvenue sur CsharpFR", SpeechVoiceSpeakFlags.SVSFlagsAsync);
            Console.ReadLine();
        }
    }
}

puis j'ai ajouté à mon projet la référence (dans l'onglet COM) : Microsoft Speech Object Library
au début, ça a trés bien marché, mais ensuite, tout à coup!!!!!, ça ne voulais pas s'executer, et j'ai l'affichage suivant pour la méthode .Speak :
COMException was unhandled
Exception from HRESULT:0*80045001
Troubleshooting tips:
Check the ErrorCode property of the exception to determine the HRESULT returned by the COM object.
Get general help for this exception.

SVP, aidez moi!

1 réponse

Lutinore Messages postés 3246 Date d'inscription lundi 25 avril 2005 Statut Membre Dernière intervention 27 octobre 2012 41
22 mars 2006 à 17:47
Si tu as téléchargé le SDK tu devrais trouver la signification de se HRESULT dedans.
0
Rejoignez-nous