VoiceInsert

Signaler
Messages postés
2
Date d'inscription
jeudi 6 décembre 2007
Statut
Membre
Dernière intervention
14 juillet 2008
-
Messages postés
14774
Date d'inscription
vendredi 14 mars 2003
Statut
Modérateur
Dernière intervention
7 mars 2021
-
J'ai un prolème avec ce code, y a t-il un samaritin dans le coin voici le code

Code Vb.net

Imports VoiceInsert.ComputerFeatures
Imports VoiceInsert
Imports System.Drawing.Graphics

Public Class Form1
    Dim WithEvents Voice As VoiceEngine
    Dim ObjDessin As System.Drawing.Graphics = Me.CreateGraphics()   'Création de l'object graphique
    Dim ObjGraph As New System.Drawing.Rectangle(0, 0, 0, 0)   'Définition d'un objet de taille de 200 x 200 à l'emplacement 100 x 100
    Dim shape2 As New System.Drawing.Rectangle(0, 0, 0, 0)

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
      
        ObjGraph.X = 12
        ObjGraph.Y = 21
        ObjGraph.Width = 313
        ObjGraph.Height = 20

        shape2.X = 12
        shape2.Y = 21
        shape2.Width = 156.5
        shape2.Height = 20

        ObjDessin.DrawRectangle(Pens.Black, ObjGraph)
        ObjDessin.FillRectangle(Brushes.White, ObjGraph)
        ObjDessin.DrawRectangle(Pens.Black, shape2)
        ObjDessin.FillRectangle(Brushes.Blue, shape2)
        TextBox2.Visible = False
        'Traçage d'un rectangle en fonction de ObjGraph

    End Sub

    Private Sub Voice_AudioSignal(ByVal StreamNumber As Integer, ByVal StreamPosition As Object, ByVal level As Integer) Handles Voice.AudioSignal
        shape2.Width = level * ObjGraph.Width / 100
        ObjDessin.DrawRectangle(Pens.Blue, shape2)
    End Sub

    Private Sub Voice_RecognitionFinalResult(ByVal StreamNumber As Integer, ByVal StreamPosition As Object, ByVal vResult As String, ByVal vPassword As String, ByVal vAudioSize As Integer, ByVal vAudioTime As Integer, ByVal StartingTime As Integer, ByVal vPronunciation As String, ByVal StartWavePosition As Integer, ByVal EndWavePosition As Integer) Handles Voice.RecognitionFinalResult
        TextBox1.Text = vResult
    End Sub

    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Try
            Voice.vStart(DictationFeatures.urDictation)

        Catch ex As Exception
            TextBox3.Text = ex.ToString
        End Try

    End Sub

    Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Voice.vStop()
    End Sub
End Class

1 réponse

Messages postés
14774
Date d'inscription
vendredi 14 mars 2003
Statut
Modérateur
Dernière intervention
7 mars 2021
151
Bonjour,

Ne connaissant pas Voice insert, peux tu décrire un peu mieux ton pb stp .

http://nhen0039.chez-alice.fr/index.php