J.A.R.V.I.S
You will need to create a text document and put all your commands !
1) Imports
2) DeclareQuote:
Imports System.Speech.Recognition
Imports System.Speech.Recognition.SrgsGrammar
Imports System.Runtime.InteropServices
Imports System.IO
Imports System.Reflection
3) SettingsQuote:
Private recognizer As SpeechRecognizer
Dim QuestionEvent As String
Dim Jarvis = CreateObject("Sapi.spvoice")
4) A small CodeQuote:
Public Sub New()
InitializeComponent()
recognizer = New SpeechRecognizer()
AddHandler recognizer.SpeechDetected, AddressOf recognizer_SpeechDetected
AddHandler recognizer.SpeechRecognitionRejected, AddressOf recognizer_SpeechRecognitionRejected
AddHandler recognizer.SpeechRecognized, AddressOf recognizer_SpeechRecognized
Dim grammar As New GrammarBuilder()
grammar.Append(New Choices(System.IO.File.ReadAllLines("Commands.txt" )))
recognizer.LoadGrammar(New Grammar(grammar))
End Sub
Quote:
Private Sub recognizer_SpeechRecognized(ByVal sender As Object, ByVal e As SpeechRecognizedEventArgs)
Dim Random As New Random
Dim Number As Integer = Random.Next(1, 10)
Select Case e.Result.Text.ToUpper
Case Is = "SPEAKING" ' Here you must put the text in capitals letter!
Jarvis.speak("And i can answer you sir !") 'Now J.AR.V.I.S is speaking ... Amazing !
End Select
End Sub
[Only registered and activated users can see links. Click Here To Register...]
_________________________Now you can turn on J.A.R.V.I.S
If you get any problem please say it here. Good luck ! :)
-NoCheatImPGM